1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-07-13 19:47:06 +01:00

Merge branch 'develop' into sycl

This commit is contained in:
Peter Boyle
2020-06-09 04:00:12 -04:00
85 changed files with 2632 additions and 1334 deletions

View File

@ -87,11 +87,7 @@ namespace Grid {
template<typename Scalar_, typename Dimensions_, int Options_, typename IndexType>
struct is_tensor_fixed<Eigen::TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType>>
: public std::true_type {};
template<typename Scalar_, typename Dimensions_, int Options_, typename IndexType,
int MapOptions_, template <class> class MapPointer_>
struct is_tensor_fixed<Eigen::TensorMap<Eigen::TensorFixedSize<Scalar_, Dimensions_,
Options_, IndexType>, MapOptions_, MapPointer_>>
: public std::true_type {};
template<typename T> struct is_tensor_fixed<Eigen::TensorMap<T>> : public std::true_type {};
// Is this a variable-size Eigen tensor
template<typename T, typename V = void> struct is_tensor_variable : public std::false_type {};

View File

@ -114,7 +114,8 @@ THE SOFTWARE.
#define GRID_MACRO_WRITE_MEMBER(A,B) ::Grid::write(WR,#B,obj. B);
#define GRID_SERIALIZABLE_CLASS_MEMBERS(cname,...)\
std::string SerialisableClassName(void) const {return std::string(#cname);} \
static inline std::string SerialisableClassName(void) {return std::string(#cname);} \
static constexpr bool isEnum = false; \
GRID_MACRO_EVAL(GRID_MACRO_MAP(GRID_MACRO_MEMBER,__VA_ARGS__))\
template <typename T>\
static inline void write(Writer<T> &WR,const std::string &s, const cname &obj){ \
@ -162,6 +163,8 @@ public:\
public:\
accelerator name(void) : value_(undefname) {}; \
accelerator name(int value): value_(value) {}; \
static inline std::string SerialisableClassName(void) {return std::string(#name);}\
static constexpr bool isEnum = true; \
template <typename T>\
static inline void write(::Grid::Writer<T> &WR,const std::string &s, const name &obj) \
{\

View File

@ -432,12 +432,10 @@ namespace Grid {
std::vector<T> strToVec(const std::string s)
{
std::istringstream sstr(s);
T buf;
std::vector<T> v;
while(!sstr.eof())
for(T buf; sstr >> buf;)
{
sstr >> buf;
v.push_back(buf);
}