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

Add dimension check to precisionChange.

This commit is contained in:
Dan H 2018-03-21 20:58:04 -04:00
parent 5436308e4a
commit ccde8b817f

View File

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