mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Fixing build errors
This commit is contained in:
parent
4b9200b35c
commit
a344a2227e
@ -134,7 +134,9 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
|
||||
int twoBlock = mat.dimension(3);
|
||||
int threeBlock = mat.dimension(4);
|
||||
|
||||
GridBase *grid = wi[0]._grid;
|
||||
assert(0 && "Apologies, Felix, next line was causing compile failure");
|
||||
//GridBase *grid = wi[0]._grid;
|
||||
GridBase *grid = nullptr;
|
||||
|
||||
const int nd = grid->_ndimension;
|
||||
const int Nsimd = grid->Nsimd();
|
||||
@ -200,7 +202,9 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
|
||||
|
||||
|
||||
// After getting the sitewise product do the mom phase loop
|
||||
int base = Nmom*i+Nmom*Lblock*j+Nmom*Lblock*Rblock*r;
|
||||
assert(0 && "Apologies, Felix, next line was causing compile failure");
|
||||
//int base = Nmom*i+Nmom*Lblock*j+Nmom*Lblock*Rblock*r;
|
||||
int base = 0;
|
||||
for ( int m=0;m<Nmom;m++){
|
||||
int idx = m+base;
|
||||
auto phase = mom[m]._odata[ss];
|
||||
|
@ -841,15 +841,10 @@ namespace Grid {
|
||||
// First check whether dimensions match (Eigen tensor library will assert if they don't match)
|
||||
bool bReturnValue = (T1::NumIndices == T2::NumIndices);
|
||||
for( auto i = 0 ; bReturnValue && i < T1::NumIndices ; i++ )
|
||||
bReturnValue = ( lhs.dimension(i)) == rhs.dimension(i);
|
||||
bReturnValue = ( lhs.dimension(i) == rhs.dimension(i) );
|
||||
if( bReturnValue ) {
|
||||
using Traits = EigenIO::Traits<typename T1::Scalar>;
|
||||
using scalar_type = typename Traits::scalar_type;
|
||||
for_all( lhs, [&](scalar_type &c, typename T1::Index n, const std::array<size_t, T1::NumIndices + Traits::rank> &Dims ) {
|
||||
scalar_type x = c - rhs[Dims];
|
||||
if( x < 1e-10 )
|
||||
bReturnValue = false;
|
||||
} );
|
||||
Eigen::Tensor<bool, 0, T1::Options> bResult = (lhs == rhs).all();
|
||||
bReturnValue = bResult(0);
|
||||
}
|
||||
return bReturnValue;
|
||||
}
|
||||
@ -865,13 +860,13 @@ namespace Grid {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline typename std::enable_if<!std::is_base_of<Eigen::TensorBase<T, Eigen::ReadOnlyAccessors>, T>::value, void>::type
|
||||
static inline typename std::enable_if<!EigenIO::is_tensor<T>::value, void>::type
|
||||
WriteMember(std::ostream &os, const T &object) {
|
||||
os << object;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline typename std::enable_if<std::is_base_of<Eigen::TensorBase<T, Eigen::ReadOnlyAccessors>, T>::value, void>::type
|
||||
static inline typename std::enable_if<EigenIO::is_tensor<T>::value, void>::type
|
||||
WriteMember(std::ostream &os, const T &object) {
|
||||
os << "Eigen::Tensor";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user