mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-14 22:07:05 +01:00
Some unary ops and coarse grid support
This commit is contained in:
@ -90,10 +90,10 @@ public:
|
||||
operator ComplexD () const { return(TensorRemove(_internal)); };
|
||||
operator RealD () const { return(real(TensorRemove(_internal))); }
|
||||
|
||||
// convert from a something to a scalar
|
||||
template<class T,typename std::enable_if<!isGridTensor<T>::value, T>::type* = nullptr > strong_inline auto operator = (T arg) -> iScalar<vtype>
|
||||
// convert from a something to a scalar via constructor of something arg
|
||||
template<class T,typename std::enable_if<!isGridTensor<T>::value, T>::type* = nullptr > strong_inline iScalar<vtype> operator = (T arg)
|
||||
{
|
||||
_internal = vtype(arg);
|
||||
_internal = arg;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -316,7 +316,8 @@ public:
|
||||
stream<<o._internal[i][j];
|
||||
if (i<N-1) stream<<",";
|
||||
}
|
||||
stream<<"}\n\t\t";
|
||||
stream<<"}";
|
||||
if(i!=N-1) stream<<"\n\t\t";
|
||||
}
|
||||
stream<<"}";
|
||||
return stream;
|
||||
|
Reference in New Issue
Block a user