mptensor v0.6.0
Parallel Library for Tensor Network Methods
Loading...
Searching...
No Matches
tensor_types.hpp
Go to the documentation of this file.
1#ifndef MPTENSOR_TEST_TENSOR_TYPES_HPP_
2#define MPTENSOR_TEST_TENSOR_TYPES_HPP_
3
4#include <string>
5#include <type_traits>
6
7#include <gtest/gtest.h>
9
10namespace mptensor_test {
11
12using namespace mptensor;
13
14#ifdef _NO_MPI
15template <typename T>
16using DistMatrix = lapack::Matrix<T>;
17#else
18template <typename T>
19using DistMatrix = scalapack::Matrix<T>;
20#endif
21
24
26using TensorTypes = ::testing::Types<TensorD, TensorC>;
27
30 template <typename TensorType>
31 static std::string GetName(int) {
32 return std::is_same_v<typename TensorType::value_type, double> ? "double"
33 : "complex";
34 }
35};
36
37} // namespace mptensor_test
38
39#endif // MPTENSOR_TEST_TENSOR_TYPES_HPP_
std::complex< double > complex
Definition complex.hpp:38
Top header file of mptensor.
Definition mpi_helpers.hpp:10
Tensor< DistMatrix< double > > TensorD
Definition tensor_types.hpp:22
scalapack::Matrix< T > DistMatrix
Definition tensor_types.hpp:19
::testing::Types< TensorD, TensorC > TensorTypes
Tensor types every TYPED_TEST runs with.
Definition tensor_types.hpp:26
Tensor< DistMatrix< complex > > TensorC
Definition tensor_types.hpp:23
Definition complex.hpp:34
Readable names ("double" / "complex") in gtest output.
Definition tensor_types.hpp:29
static std::string GetName(int)
Definition tensor_types.hpp:31