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

Class PLMatrix represents a padded local matrix (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 <plmatrix.h>

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

Public Member Functions

 PLMatrix (int n, int m, int r, int c, int ss, int tw, T nv)
 Constructor: creates a PLMatrix.
 
 ~PLMatrix ()
 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 getRows () const
 Returns the number of rows of the padded local matrix. More...
 
MSL_USERFUNC int getCols () const
 Returns the number of columns of the padded local matrix. More...
 
MSL_USERFUNC T get (int row, int col) const
 Returns the element at the given global indices (row, col). More...
 
void setFirstRowGPU (int fr)
 Sets the first row index for the current device. More...
 
- Public Member Functions inherited from msl::ArgumentType
virtual ~ArgumentType ()
 Virtual destructor.
 

Detailed Description

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

Class PLMatrix represents a padded local matrix (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::PLMatrix< T >::get ( int  row,
int  col 
) const
inline

Returns the element at the given global indices (row, col).

Parameters
rowThe global row index.
colThe global col index.
template<typename T>
MSL_USERFUNC int msl::PLMatrix< T >::getCols ( ) const
inline

Returns the number of columns of the padded local matrix.

Returns
The number of columns of the padded local matrix.
template<typename T>
MSL_USERFUNC int msl::PLMatrix< T >::getRows ( ) const
inline

Returns the number of rows of the padded local matrix.

Returns
The number of rows of the padded local matrix.
template<typename T>
void msl::PLMatrix< T >::setFirstRowGPU ( int  fr)
inline

Sets the first row index for the current device.

Parameters
frThe first row index.

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