mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-13 01:05:36 +00:00
Moving where in to the expression template system; deprecate
This commit is contained in:
parent
c185cbdc40
commit
e5c980f169
@ -8,13 +8,14 @@ namespace Grid {
|
|||||||
// and blow away the tensor structures.
|
// and blow away the tensor structures.
|
||||||
//
|
//
|
||||||
template<class vobj,class iobj>
|
template<class vobj,class iobj>
|
||||||
inline void where(Lattice<vobj> &ret,const Lattice<iobj> &predicate,Lattice<vobj> &iftrue,Lattice<vobj> &iffalse)
|
inline void whereWolf(Lattice<vobj> &ret,const Lattice<iobj> &predicate,Lattice<vobj> &iftrue,Lattice<vobj> &iffalse)
|
||||||
{
|
{
|
||||||
conformable(iftrue,iffalse);
|
conformable(iftrue,iffalse);
|
||||||
conformable(iftrue,predicate);
|
conformable(iftrue,predicate);
|
||||||
conformable(iftrue,ret);
|
conformable(iftrue,ret);
|
||||||
|
|
||||||
GridBase *grid=iftrue._grid;
|
GridBase *grid=iftrue._grid;
|
||||||
|
|
||||||
typedef typename vobj::scalar_object scalar_object;
|
typedef typename vobj::scalar_object scalar_object;
|
||||||
typedef typename vobj::scalar_type scalar_type;
|
typedef typename vobj::scalar_type scalar_type;
|
||||||
typedef typename vobj::vector_type vector_type;
|
typedef typename vobj::vector_type vector_type;
|
||||||
@ -43,7 +44,7 @@ PARALLEL_FOR_LOOP
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class vobj,class iobj>
|
template<class vobj,class iobj>
|
||||||
inline Lattice<vobj> where(const Lattice<iobj> &predicate,Lattice<vobj> &iftrue,Lattice<vobj> &iffalse)
|
inline Lattice<vobj> whereWolf(const Lattice<iobj> &predicate,Lattice<vobj> &iftrue,Lattice<vobj> &iffalse)
|
||||||
{
|
{
|
||||||
conformable(iftrue,iffalse);
|
conformable(iftrue,iffalse);
|
||||||
conformable(iftrue,predicate);
|
conformable(iftrue,predicate);
|
||||||
|
Loading…
Reference in New Issue
Block a user