1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Merge pull request #159 from goracle/dev-precsafe

Add dimension check to precisionChange.
This commit is contained in:
Peter Boyle 2018-03-22 10:41:53 +00:00 committed by GitHub
commit 6ef4af989b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -652,6 +652,7 @@ vectorizeFromLexOrdArray( std::vector<sobj> &in, Lattice<vobj> &out)
template<class VobjOut, class VobjIn>
void precisionChange(Lattice<VobjOut> &out, const Lattice<VobjIn> &in){
assert(out._grid->Nd() == in._grid->Nd());
assert(out._grid->FullDimensions() == in._grid->FullDimensions());
out.checkerboard = in.checkerboard;
GridBase *in_grid=in._grid;
GridBase *out_grid = out._grid;