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

Merge branch 'develop' into feature/hmc_generalise

This commit is contained in:
Guido Cossu
2017-02-09 16:12:00 +00:00
85 changed files with 5136 additions and 1145 deletions

View File

@ -26,7 +26,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
See the full license in the file "LICENSE" in the top level distribution directory
*************************************************************************************/
/* END LEGAL */
#include <Grid.h>
#include <Grid/Grid.h>
using namespace Grid;
using namespace std;

View File

@ -1,4 +1,4 @@
#include <Grid.h>
#include <Grid/Grid.h>
using namespace Grid;
#ifndef H5_NO_NAMESPACE

View File

@ -150,14 +150,14 @@ friend inline bool operator==(const cname &lhs, const cname &rhs) {\
class name: public Grid::Serializable\
{\
public:\
enum EnumType\
enum\
{\
GRID_MACRO_EVAL(GRID_MACRO_MAP(GRID_MACRO_ENUMVAL,__VA_ARGS__))\
undefname = -1\
};\
public:\
name(void): value_(undefname) {};\
name(EnumType value): value_(value) {};\
name(int value): value_(value) {};\
template <typename T>\
static inline void write(Grid::Writer<T> &WR,const std::string &s, const name &obj)\
{\
@ -177,7 +177,7 @@ public:\
GRID_MACRO_EVAL(GRID_MACRO_MAP(GRID_MACRO_ENUMTEST,__VA_ARGS__))\
else {obj = name::undefname;}\
}\
inline operator EnumType(void) const\
inline operator int(void) const\
{\
return value_;\
}\
@ -189,8 +189,17 @@ public:\
}\
return os;\
}\
inline friend std::istream & operator>>(std::istream &is, name &obj)\
{\
std::string buf;\
is >> buf;\
if (buf == #undefname) {obj = name::undefname;}\
GRID_MACRO_EVAL(GRID_MACRO_MAP(GRID_MACRO_ENUMTEST,__VA_ARGS__))\
else {obj = name::undefname;}\
return is;\
}\
private:\
EnumType value_;\
int value_;\
};

View File

@ -27,8 +27,7 @@
See the full license in the file "LICENSE" in the top level distribution directory
*************************************************************************************/
/* END LEGAL */
#include <Grid.h>
#include <ctype.h>
#include <Grid/Grid.h>
using namespace Grid;
using namespace std;

View File

@ -26,7 +26,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
See the full license in the file "LICENSE" in the top level distribution directory
*************************************************************************************/
/* END LEGAL */
#include <Grid.h>
#include <Grid/Grid.h>
using namespace Grid;
using namespace std;