mirror of
https://github.com/paboyle/Grid.git
synced 2026-10-31 01:33:18 +00:00
Better to use Zero(), and not zero static data
This commit is contained in:
1 parent
db9c9475d4
commit
461df78a3f
1 file changed
+3
-3
+3
-3
@@ -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; };
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
Reference in new issue
Block a user