|
| | array2d_view (void) |
| |
| | array2d_view (const array2d_view &a) |
| |
| | array2d_view (array2d< typename Parent::value_type, typename Parent::memory_space, orientation > &a) |
| |
| template<typename Array2 > |
| | array2d_view (size_t num_rows, size_t num_cols, size_t pitch, const Array2 &values) |
| |
| values_array_type::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) |
| |
| row_view | row (size_t i) |
| |
| column_view | column (size_t i) |
| |
| row_view | row (size_t i) const |
| |
| column_view | column (size_t i) const |
| |
| transpose_const_view_type | T (void) const |
| |
template<typename ArrayView, class Orientation = cusp::row_major>
class cusp::array2d_view< ArrayView, Orientation >
The array2d_view is a view of a array2d container.
- Template Parameters
-
| Iterator | The iterator type used to encapsulate the underlying data. |
- Overview
- array2d_view is a container that wraps existing iterators in array2d datatypes to interoperate with cusp algorithms.
- Example
int main()
{
typedef Array::view View;
Array v(3,3);
v(0,0) = 0; v(0,1) = 1; v(0,2) = 2;
v(1,0) = 3; v(1,1) = 4; v(1,2) = 5;
v(2,0) = 6; v(2,1) = 7; v(2,2) = 8;
View v_view(v);
v_view(0,0) = -1; v_view(1,1) = -2; v_view(2,2) = -3;
}
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 328 of file array2d.h.
template<typename ArrayView , class Orientation = cusp::row_major>
template<typename Array2 >
| cusp::array2d_view< ArrayView, Orientation >::array2d_view |
( |
size_t |
num_rows, |
|
|
size_t |
num_cols, |
|
|
size_t |
pitch, |
|
|
const Array2 & |
values |
|
) |
| |
|
inline |
This constructor creates a array2d vector with the given shape, fills the entries with a given value and sets the pitch.
- Template Parameters
-
| Array2 | The type of values used to construct this array2d_view. |
- Parameters
-
| num_rows | The number of array2d_view rows. |
| num_cols | The number of array2d_view columns. |
| values | The initial value of all entries. |
| pitch | The stride between entries in the major dimension. |
Definition at line 404 of file array2d.h.