#include <cs_array_2dspan.h>
Collaboration diagram for array_2dspan< T >:Public Member Functions | |
| CS_F_HOST_DEVICE | array_2dspan () |
| Default constructor method leading to "empty container". More... | |
| CS_F_HOST_DEVICE | array_2dspan (cs_lnum_t dim1, cs_lnum_t dim2, const char *file_name=__FILE__, const int line_number=__LINE__) |
| Constructor method using only dimension. More... | |
| CS_F_HOST_DEVICE | array_2dspan (cs_lnum_t dim1, cs_lnum_t dim2, cs_alloc_mode_t alloc_mode, const char *file_name=__FILE__, const int line_number=__LINE__) |
| Constructor method with specified allocation method. More... | |
| CS_F_HOST_DEVICE | array_2dspan (cs_lnum_t dim1, cs_lnum_t dim2, T *data_array, cs_alloc_mode_t alloc_mode=cs_alloc_mode) |
| Constructor method for non owner version. More... | |
| CS_F_HOST_DEVICE | array_2dspan (array_2dspan &other, bool shallow_copy=false, const char *file_name=__FILE__, const int line_number=__LINE__) |
| Constructor method using copy. May be a shallow copy. More... | |
| CS_F_HOST_DEVICE | array_2dspan (array_2dspan &&other) |
| Move constructor. More... | |
| CS_F_HOST_DEVICE | ~array_2dspan () |
| Destructor method. More... | |
| CS_F_HOST_DEVICE array_2dspan & | operator= (array_2dspan other) |
| Assignment operator. More... | |
| CS_F_HOST_DEVICE void | clear () |
| Clear data (empty container). More... | |
| CS_F_HOST_DEVICE void | empty () |
| Initializer method for empty containers. More... | |
| CS_F_HOST_DEVICE void | point_to (array_2dspan &other) |
| Change pointers/size of an existing container. More... | |
| CS_F_HOST_DEVICE void | set_to_val (T val) |
| Set all values of the data array to a constant value. More... | |
| CS_F_HOST_DEVICE void | resize (cs_lnum_t dim1, cs_lnum_t dim2, const char *file_name=__FILE__, const int line_number=__LINE__) |
| Resize data array. More... | |
| CS_F_HOST_DEVICE void | resize (cs_lnum_t dim1, cs_lnum_t dim2, bool copy_data, cs_lnum_t size_to_keep, const char *file_name=__FILE__, const int line_number=__LINE__) |
| Resize data array while keeping some of the old data. More... | |
| CS_F_HOST_DEVICE array_2dspan | view () |
| Get a view (non owner) of the array. More... | |
| CS_F_HOST_DEVICE void | set_alloc_mode (cs_alloc_mode_t mode) |
| Set memory allocation mode. More... | |
| CS_F_HOST_DEVICE T * | vals () |
| Getter function for full array. More... | |
| CS_F_HOST_DEVICE const T * | vals () const |
| Const getter function for full array. More... | |
| CS_F_HOST_DEVICE T * | operator[] (int i) |
| Overloaded [] operator to access the ith subarray (val[i][...]). More... | |
| CS_F_HOST_DEVICE const T * | operator[] (int i) const |
| Overloaded const [] operator to access the ith subarray (val[i][...]). More... | |
| CS_F_HOST_DEVICE cs_lnum_t | dim1 () |
| Getter function for first dimension size. More... | |
| CS_F_HOST_DEVICE cs_lnum_t | dim2 () |
| Getter function for second dimension size. More... | |
| CS_F_HOST_DEVICE cs_lnum_t | size () |
| Getter function for total size. More... | |
Friends | |
| CS_F_HOST_DEVICE friend void | swap (array_2dspan &first, array_2dspan &second) |
| Class swap operator used for assignment or move. More... | |
|
inline |
Default constructor method leading to "empty container".
|
inline |
Constructor method using only dimension.
| [in] | dim1 | First dimension size |
| [in] | dim2 | Second dimension size |
| [in] | file_name | Caller file (for log) |
| [in] | line_number | Caller line (for log) |
|
inline |
Constructor method with specified allocation method.
| [in] | dim1 | First dimension size |
| [in] | dim2 | Second dimension size |
| [in] | alloc_mode | Memory allocation mode |
| [in] | file_name | Caller file (for log) |
| [in] | line_number | Caller line (for log) |
|
inline |
Constructor method for non owner version.
| [in] | dim1 | First dimension size |
| [in] | dim2 | Second dimension size |
| [in] | data_array | Pointer to data array |
| [in] | alloc_mode | Memory allocation mode, default is HOST. |
|
inline |
Constructor method using copy. May be a shallow copy.
| [in] | other | Instance to copy |
| [in] | shallow_copy | Do a shallow copy or not |
| [in] | file_name | Caller file (for log) |
| [in] | line_number | Caller line (for log) |
|
inline |
Move constructor.
| [in] | other | Original reference to move |
|
inline |
Destructor method.
|
inline |
Clear data (empty container).
|
inline |
Getter function for first dimension size.
|
inline |
Getter function for second dimension size.
|
inline |
Initializer method for empty containers.
|
inline |
Assignment operator.
|
inline |
Overloaded [] operator to access the ith subarray (val[i][...]).
| [in] | i | sub-array index to access |
|
inline |
Overloaded const [] operator to access the ith subarray (val[i][...]).
| [in] | i | sub-array index to access |
|
inline |
Change pointers/size of an existing container.
| [in] | other | Other instance to which we want to point to (shallow copy) |
|
inline |
Resize data array while keeping some of the old data.
| [in] | dim1 | First dimension size |
| [in] | dim2 | Second dimension size |
| [in] | copy_data | Copy data from old pointer to new array. Default is false. |
| [in] | size_to_keep | Size of data to keep |
| [in] | file_name | Caller file (for log) |
| [in] | line_number | Caller line (for log) |
|
inline |
Resize data array.
| [in] | dim1 | First dimension size |
| [in] | dim2 | Second dimension size |
| [in] | file_name | Caller file (for log) |
| [in] | line_number | Caller line (for log) |
|
inline |
Set memory allocation mode.
| [in] | mode | Memory allocation mode. |
|
inline |
Set all values of the data array to a constant value.
| [in] | val | Value to set to entire data array. |
|
inline |
Getter function for total size.
|
inline |
Getter function for full array.
|
inline |
Const getter function for full array.
|
inline |
Get a view (non owner) of the array.
|
friend |
Class swap operator used for assignment or move.
| [in,out] | first | First class instance |
| [in,out] | second | Second class instance |