HOPS
HOPS class reference
Classes | Public Member Functions | Protected Member Functions | List of all members
hops::MHO_CyclicRotator< XArrayType > Class Template Reference

Class MHO_CyclicRotator. More...

#include <MHO_CyclicRotator.hh>

Inheritance diagram for hops::MHO_CyclicRotator< XArrayType >:
[legend]

Public Member Functions

 MHO_CyclicRotator ()
 
virtual ~MHO_CyclicRotator ()
 
void SetOffset (std::size_t dimension_index, int64_t offset_value)
 set the offset for the cyclic rotation in each dimension (default is zero...do nothing) More...
 
- Public Member Functions inherited from hops::MHO_UnaryOperator< XArrayType >
 MHO_UnaryOperator ()
 
virtual ~MHO_UnaryOperator ()
 
virtual bool Execute () override
 Executes operation using provided arguments and return type. More...
 
virtual bool Execute () override=0
 Function Execute. More...
 
virtual bool Initialize () override
 Initializes the system using in-place or out-of-place arguments. More...
 
virtual bool Initialize () override=0
 Function Initialize. More...
 
 MHO_Operator ()
 
virtual void SetArgs (const XArrayType *in, XArrayType *out)
 Setter for args. More...
 
virtual void SetArgs (XArrayType *in)
 Setter for args. More...
 
- Public Member Functions inherited from hops::MHO_Operator
 MHO_Operator ()
 
virtual ~MHO_Operator ()
 
std::string GetName () const
 Getter for operator name. More...
 
virtual double Priority () const
 Get the the priority field value. More...
 
void SetName (std::string name)
 Setter for operator name. More...
 
virtual void SetPriority (const double &priority)
 Setter for operator priority (determines order of execution within a operator category) More...
 

Protected Member Functions

virtual bool ExecuteInPlace (XArrayType *in) override
 Function ExecuteInPlace - executes the rotation. More...
 
virtual bool ExecuteOutOfPlace (const XArrayType *in, XArrayType *out) override
 Function ExecuteOutOfPlace - executes the rotation. More...
 
virtual bool InitializeInPlace (XArrayType *in) override
 Initializes in-place rotation and sets flag if input is not nullptr. More...
 
virtual bool InitializeOutOfPlace (const XArrayType *in, XArrayType *out) override
 Function InitializeOutOfPlace - executes the rotation. More...
 

Additional Inherited Members

- Protected Attributes inherited from hops::MHO_UnaryOperator< XArrayType >
bool fInPlace
 
std::tuple< XArrayType * > fInPlaceArgs
 
std::tuple< const XArrayType *, XArrayType * > fOutOfPlaceArgs
 

Detailed Description

template<class XArrayType>
class hops::MHO_CyclicRotator< XArrayType >

Class MHO_CyclicRotator.

Applies a cyclic rotation to the contents on a multidimensional array by some specified offset for each dimension.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Mon Aug 23 15:27:52 2021 -0400

Constructor & Destructor Documentation

◆ MHO_CyclicRotator()

template<class XArrayType >
hops::MHO_CyclicRotator< XArrayType >::MHO_CyclicRotator ( )
inline

◆ ~MHO_CyclicRotator()

template<class XArrayType >
virtual hops::MHO_CyclicRotator< XArrayType >::~MHO_CyclicRotator ( )
inlinevirtual

Member Function Documentation

◆ ExecuteInPlace()

template<class XArrayType >
virtual bool hops::MHO_CyclicRotator< XArrayType >::ExecuteInPlace ( XArrayType *  in)
inlineoverrideprotectedvirtual

Function ExecuteInPlace - executes the rotation.

Parameters
in(XArrayType*)
Returns
Return value (bool)
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ ExecuteOutOfPlace()

template<class XArrayType >
virtual bool hops::MHO_CyclicRotator< XArrayType >::ExecuteOutOfPlace ( const XArrayType *  in,
XArrayType *  out 
)
inlineoverrideprotectedvirtual

Function ExecuteOutOfPlace - executes the rotation.

Parameters
in(const XArrayType*)
out(XArrayType*)
Returns
Return value (bool)
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ InitializeInPlace()

template<class XArrayType >
virtual bool hops::MHO_CyclicRotator< XArrayType >::InitializeInPlace ( XArrayType *  in)
inlineoverrideprotectedvirtual

Initializes in-place rotation and sets flag if input is not nullptr.

Parameters
inInput array for initialization.
Returns
True if initialized successfully, false otherwise.
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ InitializeOutOfPlace()

template<class XArrayType >
virtual bool hops::MHO_CyclicRotator< XArrayType >::InitializeOutOfPlace ( const XArrayType *  in,
XArrayType *  out 
)
inlineoverrideprotectedvirtual

Function InitializeOutOfPlace - executes the rotation.

Parameters
in(const XArrayType*)
out(XArrayType*)
Returns
Return value (bool)
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ SetOffset()

template<class XArrayType >
void hops::MHO_CyclicRotator< XArrayType >::SetOffset ( std::size_t  dimension_index,
int64_t  offset_value 
)
inline

set the offset for the cyclic rotation in each dimension (default is zero...do nothing)

Parameters
dimension_indexIndex of the dimension to set the offset for
offset_value(int64_t)

A negative offset_value results in a "right" rotation: e.g. rot by 1: [0 1 2 3] -> [3 0 1 2] A positive offset_value results in a "left" rotation: e.g. rot by -1: [0 1 2 3] -> [1 2 3 0]


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