1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-04 19:25:56 +01:00

Better to use Zero(), and not zero static data

This commit is contained in:
paboyle 2018-01-25 23:36:22 +00:00
parent db9c9475d4
commit 461df78a3f

View File

@ -180,11 +180,11 @@ accelerator_inline void vstream(RealD &l, const RealD &r){ l=r;}
class Zero{};
static Zero zero;
template<class itype> accelerator_inline void zeroit(itype &arg){ arg=zero;};
template<class itype> accelerator_inline void zeroit(itype &arg) { arg=Zero();};
template<> accelerator_inline void zeroit(ComplexF &arg){ arg=0; };
template<> accelerator_inline void zeroit(ComplexD &arg){ arg=0; };
template<> accelerator_inline void zeroit(RealF &arg){ arg=0; };
template<> accelerator_inline void zeroit(RealD &arg){ arg=0; };
template<> accelerator_inline void zeroit(RealF &arg) { arg=0; };
template<> accelerator_inline void zeroit(RealD &arg) { arg=0; };
//////////////////////////////////////////////////////////