|
| | array2d (void) |
| |
| | array2d (size_t num_rows, size_t num_cols) |
| |
| | array2d (size_t num_rows, size_t num_cols, const ValueType &value) |
| |
| | array2d (const size_t num_rows, const size_t num_cols, const ValueType &value, const size_t pitch) |
| |
| template<typename MatrixType > |
| | array2d (const MatrixType &matrix) |
| |
| values_array_type::reference | operator() (const size_t i, const size_t j) |
| |
| values_array_type::const_reference | operator() (const size_t i, const size_t j) const |
| |
| void | resize (const size_t num_rows, const size_t num_cols) |
| |
| void | resize (const size_t num_rows, const size_t num_cols, const size_t pitch) |
| |
| void | swap (array2d &matrix) |
| |
| row_view | row (const size_t i) |
| |
| column_view | column (const size_t i) |
| |
| const_row_view | row (const size_t i) const |
| |
| const_column_view | column (const size_t i) const |
| |
| array2d & | operator= (const array2d &matrix) |
| |
| template<typename MatrixType > |
| array2d & | operator= (const MatrixType &matrix) |
| |
| transpose_const_view_type | T (void) const |
| |
template<typename ValueType, typename MemorySpace, typename Orientation = cusp::row_major>
class cusp::array2d< ValueType, MemorySpace, Orientation >
The array2d class is a 2D vector container that may contain elements stored in "host" or "device" memory space.
- Template Parameters
-
| T | value_type of the array |
| MemorySpace | memory space of the array (cusp::host_memory or cusp::device_memory) |
| Orientation | orientation of the array (cusp::row_major or cusp::column_major) |
- Overview
- A array2d vector is a container that supports random access to elements. The memory associated with a array2d vector may reside in either "host" or "device" memory depending on the supplied allocator embedded in the MemorySpace template argument. array2d vectors represent 2D matrices in either row-major or column-major format.
- Example
int main()
{
a(0,0) = 0; a(0,1) = 1; a(0,2) = 2;
a(1,0) = 3; a(1,1) = 4; a(1,2) = 5;
a(2,0) = 6; a(2,1) = 7; a(2,2) = 8;
}
2D array of elements that may reside in "host" or "device" memory space
The array2d class is a 2D vector container that may contain elements stored in "host" or "device" mem...
void print(const Printable &p)
print a textual representation of an object
Print textual representation of an object.
Definition at line 93 of file array2d.h.