QDP++
QDP::Map Class Reference

General permutation map class for communications. More...

#include <qdp_parscalar_specific.h>

Public Member Functions

 Map ()
 Constructor - does nothing really.
 ~Map ()
 Destructor.
 Map (const MapFunc &fn)
 Constructor from a function object.
void make (const MapFunc &func)
 Actual constructor from a function object.
template<class T1>
OLattice< T1 > operator() (const OLattice< T1 > &l)
 Function call operator for a shift.
template<class T1>
OScalar< T1 > operator() (const OScalar< T1 > &l)
template<class RHS, class T1>
OScalar< T1 > operator() (const QDPExpr< RHS, OScalar< T1 > > &l)
template<class RHS, class T1>
OLattice< T1 > operator() (const QDPExpr< RHS, OLattice< T1 > > &l)
const multi1d< int > & goffset () const
 Accessor to offsets.
const multi1d< int > & soffset () const
 Map ()
 Constructor - does nothing really.
 ~Map ()
 Destructor.
 Map (const MapFunc &fn)
 Constructor from a function object.
void make (const MapFunc &func)
 Actual constructor from a function object.
template<class T1>
OLattice< T1 > operator() (const OLattice< T1 > &l)
 Function call operator for a shift.
template<class T1>
OScalar< T1 > operator() (const OScalar< T1 > &l)
template<class RHS, class T1>
OScalar< T1 > operator() (const QDPExpr< RHS, OScalar< T1 > > &l)
template<class RHS, class T1>
OLattice< T1 > operator() (const QDPExpr< RHS, OLattice< T1 > > &l)
const multi1d< int > & goffset () const
 Accessor to offsets.
const multi1d< int > & soffset () const
 Map ()
 Constructor - does nothing really.
 ~Map ()
 Destructor.
 Map (const MapFunc &fn)
 Constructor from a function object.
void make (const MapFunc &func)
 Actual constructor from a function object.
template<class T1, class C1>
MakeReturn< UnaryNode< FnMap, typenameCreateLeaf< QDPType< T1, C1 > >::Leaf_t >, C1 >::Expression_t operator() (const QDPType< T1, C1 > &l)
 Function call operator for a shift.
template<class T1, class C1>
MakeReturn< UnaryNode< FnMap, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, C1 >::Expression_t operator() (const QDPExpr< T1, C1 > &l)
const multi1d< int > & Offsets () const
 Accessor to offsets.
 Map ()
 Constructor - does nothing really.
 ~Map ()
 Destructor.
 Map (const MapFunc &fn)
 Constructor from a function object.
void make (const MapFunc &func)
 Actual constructor from a function object.
template<class T1>
OLattice< T1 > operator() (const OLattice< T1 > &l)
 Function call operator for a shift.
template<class T1>
OScalar< T1 > operator() (const OScalar< T1 > &l)
template<class RHS, class T1>
OScalar< T1 > operator() (const QDPExpr< RHS, OScalar< T1 > > &l)
template<class RHS, class T1>
OLattice< T1 > operator() (const QDPExpr< RHS, OLattice< T1 > > &l)
const multi1d< int > & goffset () const
 Accessor to offsets.

Detailed Description

General permutation map class for communications.

Definition at line 1879 of file qdp_parscalar_specific.h.

Constructor & Destructor Documentation

◆ Map() [1/8]

QDP::Map::Map ( )
inline

Constructor - does nothing really.

Definition at line 1883 of file qdp_parscalar_specific.h.

◆ ~Map() [1/4]

QDP::Map::~Map ( )
inline

Destructor.

Definition at line 1886 of file qdp_parscalar_specific.h.

◆ Map() [2/8]

QDP::Map::Map ( const MapFunc & fn)
inline

Constructor from a function object.

Definition at line 1889 of file qdp_parscalar_specific.h.

References make().

◆ Map() [3/8]

QDP::Map::Map ( )
inline

Constructor - does nothing really.

Definition at line 971 of file qdp_parscalarvec_specific.h.

◆ ~Map() [2/4]

QDP::Map::~Map ( )
inline

Destructor.

Definition at line 974 of file qdp_parscalarvec_specific.h.

◆ Map() [4/8]

QDP::Map::Map ( const MapFunc & fn)
inline

Constructor from a function object.

Definition at line 977 of file qdp_parscalarvec_specific.h.

References make().

◆ Map() [5/8]

QDP::Map::Map ( )
inline

Constructor - does nothing really.

Definition at line 1789 of file qdp_scalar_specific.h.

◆ ~Map() [3/4]

QDP::Map::~Map ( )
inline

Destructor.

Definition at line 1792 of file qdp_scalar_specific.h.

◆ Map() [6/8]

QDP::Map::Map ( const MapFunc & fn)
inline

Constructor from a function object.

Definition at line 1795 of file qdp_scalar_specific.h.

References make().

◆ Map() [7/8]

QDP::Map::Map ( )
inline

Constructor - does nothing really.

Definition at line 883 of file qdp_scalarvec_specific.h.

◆ ~Map() [4/4]

QDP::Map::~Map ( )
inline

Destructor.

Definition at line 886 of file qdp_scalarvec_specific.h.

◆ Map() [8/8]

QDP::Map::Map ( const MapFunc & fn)
inline

Constructor from a function object.

Definition at line 889 of file qdp_scalarvec_specific.h.

References make().

Member Function Documentation

◆ goffset() [1/3]

const multi1d< int > & QDP::Map::goffset ( ) const
inline

Accessor to offsets.

Definition at line 2164 of file qdp_parscalar_specific.h.

◆ goffset() [2/3]

const multi1d< int > & QDP::Map::goffset ( ) const
inline

Accessor to offsets.

Definition at line 1275 of file qdp_parscalarvec_specific.h.

◆ goffset() [3/3]

const multi1d< int > & QDP::Map::goffset ( ) const
inline

Accessor to offsets.

Definition at line 995 of file qdp_scalarvec_specific.h.

◆ make() [1/4]

void QDP::Map::make ( const MapFunc & func)

Actual constructor from a function object.

Initializer for generic map constructor.

The semantics are source_site = func(dest_site,isign)

Definition at line 29 of file qdp_parscalar_specific.cc.

References QDP::Layout::linearSiteIndex(), QDP::Layout::nodeNumber(), QDP::QDP_error_exit(), QDP::QDP_info(), QDP::multi1d< T >::resize(), QDP::Layout::siteCoords(), QDP::Layout::sitesOnNode(), QDP::multi1d< T >::size(), and QDP::uniquify_list().

Referenced by Map(), operator()(), and operator()().

◆ make() [2/4]

void QDP::Map::make ( const MapFunc & func)

Actual constructor from a function object.

The semantics are source_site = func(dest_site,isign)

◆ make() [3/4]

void QDP::Map::make ( const MapFunc & func)

Actual constructor from a function object.

The semantics are source_site = func(dest_site)

◆ make() [4/4]

void QDP::Map::make ( const MapFunc & func)

Actual constructor from a function object.

The semantics are source_site = func(dest_site,isign)

◆ Offsets()

const multi1d< int > & QDP::Map::Offsets ( ) const
inline

Accessor to offsets.

Definition at line 1837 of file qdp_scalar_specific.h.

◆ operator()() [1/14]

template<class T1>
OLattice< T1 > QDP::Map::operator() ( const OLattice< T1 > & l)
inline

Function call operator for a shift.

map(source)

Implements: dest(x) = s1(x+offsets)

Shifts on a OLattice are non-trivial.

Notice, this implementation does not allow an Inner grid

Definition at line 1907 of file qdp_parscalar_specific.h.

References QDP::OLattice< T >::elem(), QDP::Layout::getLogicalCoordFrom(), QDP::Layout::nodeCoord(), QDP::Layout::nodeNumber(), QDP_ALIGNMENT_SIZE, QDP::QDP_error_exit(), QDP::QDP_info(), and QDP::Layout::sitesOnNode().

Referenced by operator()(), and operator()().

◆ operator()() [2/14]

template<class T1>
OLattice< T1 > QDP::Map::operator() ( const OLattice< T1 > & l)
inline

Function call operator for a shift.

map(source)

Implements: dest(x) = s1(x+offsets)

Shifts on a OLattice are non-trivial.

Notice, this implementation does not allow an Inner grid

Definition at line 995 of file qdp_parscalarvec_specific.h.

References QDP::copy_site(), QDP::OLattice< T >::elem(), QDP::gather_sites(), QDP::getSite(), INNER_LEN, INNER_LOG, QDP::Layout::nodeNumber(), QDP_ALIGNMENT_SIZE, QDP::QDP_error_exit(), QDP::QDP_info(), and QDP::Layout::sitesOnNode().

◆ operator()() [3/14]

template<class T1>
OLattice< T1 > QDP::Map::operator() ( const OLattice< T1 > & l)
inline

Function call operator for a shift.

map(source)

Implements: dest(x) = s1(x+offsets)

Shifts on a OLattice are non-trivial.

Notice, this implementation supports an Inner grid

Definition at line 907 of file qdp_scalarvec_specific.h.

References QDP::OLattice< T >::elem(), QDP::gather_sites(), INNER_LEN, INNER_LOG, QDP::QDP_info(), and QDP::Layout::sitesOnNode().

◆ operator()() [4/14]

template<class T1>
OScalar< T1 > QDP::Map::operator() ( const OScalar< T1 > & l)
inline

Definition at line 2130 of file qdp_parscalar_specific.h.

◆ operator()() [5/14]

template<class T1>
OScalar< T1 > QDP::Map::operator() ( const OScalar< T1 > & l)
inline

Definition at line 1241 of file qdp_parscalarvec_specific.h.

◆ operator()() [6/14]

template<class T1>
OScalar< T1 > QDP::Map::operator() ( const OScalar< T1 > & l)
inline

Definition at line 961 of file qdp_scalarvec_specific.h.

◆ operator()() [7/14]

template<class RHS, class T1>
OLattice< T1 > QDP::Map::operator() ( const QDPExpr< RHS, OLattice< T1 > > & l)
inline

Definition at line 2150 of file qdp_parscalar_specific.h.

References operator()().

◆ operator()() [8/14]

template<class RHS, class T1>
OLattice< T1 > QDP::Map::operator() ( const QDPExpr< RHS, OLattice< T1 > > & l)
inline

Definition at line 1261 of file qdp_parscalarvec_specific.h.

References operator()().

◆ operator()() [9/14]

template<class RHS, class T1>
OLattice< T1 > QDP::Map::operator() ( const QDPExpr< RHS, OLattice< T1 > > & l)
inline

Definition at line 981 of file qdp_scalarvec_specific.h.

References operator()().

◆ operator()() [10/14]

template<class RHS, class T1>
OScalar< T1 > QDP::Map::operator() ( const QDPExpr< RHS, OScalar< T1 > > & l)
inline

Definition at line 2137 of file qdp_parscalar_specific.h.

References operator()().

◆ operator()() [11/14]

template<class RHS, class T1>
OScalar< T1 > QDP::Map::operator() ( const QDPExpr< RHS, OScalar< T1 > > & l)
inline

Definition at line 1248 of file qdp_parscalarvec_specific.h.

References operator()().

◆ operator()() [12/14]

template<class RHS, class T1>
OScalar< T1 > QDP::Map::operator() ( const QDPExpr< RHS, OScalar< T1 > > & l)
inline

Definition at line 968 of file qdp_scalarvec_specific.h.

References operator()().

◆ operator()() [13/14]

template<class T1, class C1>
MakeReturn< UnaryNode< FnMap, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, C1 >::Expression_t QDP::Map::operator() ( const QDPExpr< T1, C1 > & l)
inline

Definition at line 1826 of file qdp_scalar_specific.h.

References QDP::MakeReturn< T, C >::make(), and make().

◆ operator()() [14/14]

template<class T1, class C1>
MakeReturn< UnaryNode< FnMap, typenameCreateLeaf< QDPType< T1, C1 > >::Leaf_t >, C1 >::Expression_t QDP::Map::operator() ( const QDPType< T1, C1 > & l)
inline

Function call operator for a shift.

map(source)

Implements: dest(x) = s1(x+offsets)

Shifts on a OLattice are non-trivial. Notice, there may be an ILattice underneath which requires shift args. This routine is very architecture dependent.

Definition at line 1814 of file qdp_scalar_specific.h.

References QDP::MakeReturn< T, C >::make(), and make().

◆ soffset() [1/2]

const multi1d< int > & QDP::Map::soffset ( ) const
inline

Definition at line 2165 of file qdp_parscalar_specific.h.

◆ soffset() [2/2]

const multi1d< int > & QDP::Map::soffset ( ) const
inline

Definition at line 1276 of file qdp_parscalarvec_specific.h.


The documentation for this class was generated from the following files: