Muesli
 All Classes Namespaces Files Functions Typedefs Enumerations
Public Member Functions | List of all members
msl::PLArray< T > Class Template Reference

Class PLArray represents a padded local array (partition). It serves as input for the mapStencil skeleton and actually is a shallow copy that only stores the pointers to the data. The data itself is managed by the mapStencil skeleton. For the user, the only important part is the get function. More...

#include <plarray.h>

Inheritance diagram for msl::PLArray< T >:
msl::ArgumentType

Public Member Functions

 PLArray (int n, int nl, int ss, int tw, T nv)
 Constructor: creates a PLArray.
 
 ~PLArray ()
 Destructor.
 
void addDevicePtr (T *d_ptr)
 Adds another pointer to data residing in GPU or in CPU memory, respectively.
 
void update ()
 Updates the pointer to point to current data (that resides in one of the GPUs memory or in CPU memory, respectively.
 
MSL_USERFUNC int getLocalSize () const
 Returns the size of the padded local array. More...
 
MSL_USERFUNC T get (int index) const
 Returns the element at the given global index index. More...
 
void setFirstIndexGPU (int index)
 Sets the first index for the current device. More...
 
- Public Member Functions inherited from msl::ArgumentType
virtual ~ArgumentType ()
 Virtual destructor.
 

Detailed Description

template<typename T>
class msl::PLArray< T >

Class PLArray represents a padded local array (partition). It serves as input for the mapStencil skeleton and actually is a shallow copy that only stores the pointers to the data. The data itself is managed by the mapStencil skeleton. For the user, the only important part is the get function.

Template Parameters
TThe element type.

Member Function Documentation

template<typename T>
MSL_USERFUNC T msl::PLArray< T >::get ( int  index) const
inline

Returns the element at the given global index index.

Parameters
indexThe global index.
template<typename T>
MSL_USERFUNC int msl::PLArray< T >::getLocalSize ( ) const
inline

Returns the size of the padded local array.

Returns
The size of the padded local array.
template<typename T>
void msl::PLArray< T >::setFirstIndexGPU ( int  index)
inline

Sets the first index for the current device.

Parameters
frThe first index.

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