Template Class CSCArrayKokkos
Defined in File matar.h
Class Documentation
-
template<typename T, typename Layout = DefaultLayout, typename ExecSpace = DefaultExecSpace, typename MemoryTraits = void>
class CSCArrayKokkos Public Functions
-
CSCArrayKokkos()
Construct a new empty Sparse Col Array object.
-
CSCArrayKokkos(CArrayKokkos<size_t, Layout, ExecSpace, MemoryTraits> &start_index, CArrayKokkos<T, Layout, ExecSpace, MemoryTraits> &array, CArrayKokkos<size_t, Layout, ExecSpace, MemoryTraits> &row_index, size_t dim1, size_t dim2, const std::string &tag_string)
Construct a new Sparse Col Array object.
- Parameters
array – 1d array of data values in order as read top to bottom, left to right
row_index – 1d array that marks what row each element is in
start_index – 1d array that marks where the first element of each column starts
dim1 – number of rows the matrix should have
dim2 – number of columns the matrix should have
- KOKKOS_INLINE_FUNCTION T & operator() (size_t i, size_t j) const
Access A(i,j). Returns a dummy address with value 0 if A(i,j) is not allocated.
- Parameters
i – : row
j – : column
- Returns
T& : address of array_ that corresponds to A(i,j)
- KOKKOS_INLINE_FUNCTION CSCArrayKokkos & operator= (const CSCArrayKokkos &temp)
Overloaded copy operator.
- Parameters
temp – : Array to copy
- Returns
- KOKKOS_INLINE_FUNCTION T * pointer () const
returns pointer to array_
- KOKKOS_INLINE_FUNCTION size_t stride (size_t i) const
Same functionality as nnz(i) included for compatibility with the rest of matar.
- Parameters
i – : row
- Returns
size_t
- KOKKOS_INLINE_FUNCTION T & value (size_t i, size_t j) const
Same functionality as operator() included for compatibility with the rest of matar.
- Parameters
i – row
j – column
- Returns
T&
- KOKKOS_INLINE_FUNCTION size_t * get_starts () const
Get the start_index array.
- Returns
size_t* : returns start_index_
- KOKKOS_INLINE_FUNCTION size_t dim1 () const
Get number of rows.
- Returns
size_t number of rows
- KOKKOS_INLINE_FUNCTION size_t dim2 () const
Get number of columns.
- Returns
size_t number of columns
- KOKKOS_INLINE_FUNCTION T * begin (size_t i)
iterator notation for iterating through the non zeros values of row i.
- Parameters
i – : row
- Returns
T*
- KOKKOS_INLINE_FUNCTION T * end (size_t i)
iterator notation for iterating through the non zeros values of row i.
- Parameters
i – : row
- Returns
T*
- KOKKOS_INLINE_FUNCTION size_t begin_index (size_t i)
- KOKKOS_INLINE_FUNCTION size_t end_index (size_t i)
- KOKKOS_INLINE_FUNCTION size_t nnz (size_t i)
Get the number of non zero elements in row i.
- Parameters
i – : row to get
- Returns
size_t : size of row
- KOKKOS_INLINE_FUNCTION size_t nnz () const
Get number of non zero elements total in array.
- Returns
size_t
- KOKKOS_INLINE_FUNCTION T & get_val_flat (size_t k)
- KOKKOS_INLINE_FUNCTION size_t get_row_flat (size_t k)
- KOKKOS_INLINE_FUNCTION int flat_index (size_t i, size_t j)
-
KOKKOS_INLINE_FUNCTION ~CSCArrayKokkos()
-
CSCArrayKokkos()