mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Remove warning in tensor layout comparison. Make default names and index names visible for PerambTensor and NoiseTensor
This commit is contained in:
parent
df2b0c4e79
commit
0ca1992151
@ -318,7 +318,7 @@ namespace Grid {
|
||||
TotalDims[TensorRank + i] = Traits::Dimension(i);
|
||||
|
||||
// If the Tensor isn't in Row-Major order, then we'll need to copy it's data
|
||||
const bool CopyData{NumElements > 1 && ETensor::Layout != Eigen::StorageOptions::RowMajor};
|
||||
const bool CopyData{NumElements > 1 && static_cast<int>( ETensor::Layout ) != static_cast<int>( Eigen::StorageOptions::RowMajor )};
|
||||
const Scalar * pWriteBuffer;
|
||||
std::vector<Scalar> CopyBuffer;
|
||||
const Index TotalNumElements = NumElements * Traits::count;
|
||||
|
@ -159,9 +159,9 @@ using LapEvecs = Grid::Hadrons::EigenPack<LatticeColourVector>;
|
||||
|
||||
class NoiseTensor : public NamedTensor<Complex, 4>
|
||||
{
|
||||
public:
|
||||
static const std::string Name__;
|
||||
static const std::array<std::string, 4> DefaultIndexNames__;
|
||||
public:
|
||||
// Default constructor (assumes tensor will be loaded from file)
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NoiseTensor() : NamedTensor{Name__, DefaultIndexNames__} {}
|
||||
|
||||
@ -173,9 +173,9 @@ class NoiseTensor : public NamedTensor<Complex, 4>
|
||||
|
||||
class PerambTensor : public NamedTensor<SpinVector, 6>
|
||||
{
|
||||
public:
|
||||
static const std::string Name__;
|
||||
static const std::array<std::string, 6> DefaultIndexNames__;
|
||||
public:
|
||||
// Default constructor (assumes tensor will be loaded from file)
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PerambTensor() : NamedTensor{Name__, DefaultIndexNames__} {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user