SkelCL
SkelCL is a high level multi GPU skeleton library developed at the university of Münster, Germany.
|
The IndexMatrix (a.k.a. Matrix<IndexPoint>) class is a special implementation of a Matrix with Elements of type IndexPoint. More...
#include <IndexMatrix.h>
Public Types | |
typedef IndexPoint | value_type |
Defines the type of the elements in the Matrix. | |
typedef skelcl::MatrixSize | size_type |
Defines the type used to denote size of the Matrix. | |
Public Member Functions | |
Matrix (const size_type size) | |
Create a new IndexMatrix with the given size. | |
size_type | size () const |
Returns the total size of the Matrix. More... | |
detail::Sizes | sizes () const |
Returns the size of the parts of the Matrix which are stored on each device. More... | |
value_type | operator[] (size_type n) const |
Returns the IndexPoint at position n (i.e. n). More... | |
value_type | at (size_type n) const |
Returns the IndexPoint at position n (i.e. n). More... | |
value_type | front () const |
Return the first IndexPoint stored in the Matrix (i.e. {0, 0}). More... | |
value_type | back () const |
Return the last Index stored in the Vector (i.e. {size().rowCount()-1, size().columnCount()-1}). More... | |
detail::Distribution< Matrix < IndexPoint > > & | distribution () const |
Returns the current distribution of the Matrix. More... | |
template<typename U > | |
void | setDistribution (const detail::Distribution< Matrix< U >> &distribution) const |
Changes the distribution of the Matrix. More... | |
template<typename U > | |
void | setDistribution (const std::unique_ptr< detail::Distribution< Matrix< U >>> &newDistribution) const |
Changes the distribution of the Matrix. More... | |
void | setDistribution (std::unique_ptr< detail::Distribution< Matrix< IndexPoint >>> &&newDistribution) const |
Changes the distribution of the Matrix. More... | |
const detail::DeviceBuffer & | deviceBuffer (const detail::Device &device) const |
This function should never be called as it only exists for compatibility reasons with the Matrix class. More... | |
std::vector< IndexPoint > & | hostBuffer () const |
This function should never be called as it only exists for compatibility reasons with the Matrix class. More... | |
void | dataOnDeviceModified () const |
This function should never be called as it only exists for compatibility reasons with the Matrix class. More... | |
void | dataOnHostModified () const |
This function should never be called as it only exists for compatibility reasons with the Matrix class. More... | |
Static Public Member Functions | |
static std::string | deviceFunctions () |
Returns a string defining functions necessary to access the Matrix on the device. For the IndexMatrix this function always returns an empty string. More... | |
The IndexMatrix (a.k.a. Matrix<IndexPoint>) class is a special implementation of a Matrix with Elements of type IndexPoint.
The implementation guaranties that no data is transfered to and from the devices when using this version of the Matrix. OpenCL functionality (global ids) is used to make the IndexPoints available on the device. This implementation requires, that the Matrix is const and can, therefore, not be modified after creation.
Definition at line 73 of file IndexMatrix.h.
Matrix< IndexPoint >::value_type skelcl::Matrix< IndexPoint >::at | ( | size_type | n | ) | const |
Returns the IndexPoint at position n (i.e. n).
This version does prevent out of range accesses. If n > size() an std::out_of_range exception is thrown.
n | The position for which the IndexPoint should be returned. |
Definition at line 110 of file IndexMatrix.cpp.
Matrix< IndexPoint >::value_type skelcl::Matrix< IndexPoint >::back | ( | ) | const |
void skelcl::Matrix< IndexPoint >::dataOnDeviceModified | ( | ) | const |
This function should never be called as it only exists for compatibility reasons with the Matrix class.
This function will always fail with an assertion.
Definition at line 184 of file IndexMatrix.cpp.
void skelcl::Matrix< IndexPoint >::dataOnHostModified | ( | ) | const |
This function should never be called as it only exists for compatibility reasons with the Matrix class.
This function will always fail with an assertion.
Definition at line 189 of file IndexMatrix.cpp.
const detail::DeviceBuffer & skelcl::Matrix< IndexPoint >::deviceBuffer | ( | const detail::Device & | device | ) | const |
This function should never be called as it only exists for compatibility reasons with the Matrix class.
This function will always fail with an assertion.
Definition at line 170 of file IndexMatrix.cpp.
|
static |
Returns a string defining functions necessary to access the Matrix on the device. For the IndexMatrix this function always returns an empty string.
This functions exists for compatibility reasons with the Matrix class.
Definition at line 150 of file IndexMatrix.cpp.
detail::Distribution< Matrix< IndexPoint > > & skelcl::Matrix< IndexPoint >::distribution | ( | ) | const |
Returns the current distribution of the Matrix.
Definition at line 130 of file IndexMatrix.cpp.
Matrix< IndexPoint >::value_type skelcl::Matrix< IndexPoint >::front | ( | ) | const |
Return the first IndexPoint stored in the Matrix (i.e. {0, 0}).
Definition at line 119 of file IndexMatrix.cpp.
std::vector< IndexPoint > & skelcl::Matrix< IndexPoint >::hostBuffer | ( | ) | const |
This function should never be called as it only exists for compatibility reasons with the Matrix class.
This function will always fail with an assertion.
Definition at line 177 of file IndexMatrix.cpp.
Matrix< IndexPoint >::value_type skelcl::Matrix< IndexPoint >::operator[] | ( | size_type | n | ) | const |
Returns the IndexPoint at position n (i.e. n).
This version does not prevent out of range accesses. If n > size() the behavior is undefined.
n | The position for which the IndexPoint should be returned. |
Definition at line 105 of file IndexMatrix.cpp.
void skelcl::Matrix< IndexPoint >::setDistribution | ( | const detail::Distribution< Matrix< U >> & | distribution | ) | const |
void skelcl::Matrix< IndexPoint >::setDistribution | ( | const std::unique_ptr< detail::Distribution< Matrix< U >>> & | newDistribution | ) | const |
void skelcl::Matrix< IndexPoint >::setDistribution | ( | std::unique_ptr< detail::Distribution< Matrix< IndexPoint >>> && | newDistribution | ) | const |
Changes the distribution of the Matrix.
newDistribution | The new distribution to be set. After this call distribution is the new selected distribution of the Matrix. |
Definition at line 136 of file IndexMatrix.cpp.
Matrix< IndexPoint >::size_type skelcl::Matrix< IndexPoint >::size | ( | ) | const |
Returns the total size of the Matrix.
Definition at line 89 of file IndexMatrix.cpp.
detail::Sizes skelcl::Matrix< IndexPoint >::sizes | ( | ) | const |
Returns the size of the parts of the Matrix which are stored on each device.
Definition at line 94 of file IndexMatrix.cpp.