Template Class CSRArrayKokkos
Defined in File matar.h
Nested Relationships
Nested Types
Class Documentation
-
template<typename T, typename Layout = DefaultLayout, typename ExecSpace = DefaultExecSpace, typename MemoryTraits = void>
class CSRArrayKokkos Public Functions
-
CSRArrayKokkos()
Construct a new Sparse Row Array Kokkos object.
-
CSRArrayKokkos(CArrayKokkos<size_t, Layout, ExecSpace, MemoryTraits> &start_index, CArrayKokkos<T, Layout, ExecSpace, MemoryTraits> &array, CArrayKokkos<size_t, Layout, ExecSpace, MemoryTraits> &colum_index, size_t dim1, size_t dim2, const std::string &tag_string)
-
CSRArrayKokkos(const CArrayKokkos<T, Layout, ExecSpace, MemoryTraits> &dense, const size_t dim1, const size_t dim2)
Constructor takes in dense matrix.
-
void data_setup(const std::string &tag_string)
- KOKKOS_INLINE_FUNCTION T & operator() (size_t i, size_t j) const
Access method to A(i,j) returns a dummy value of 0 if value is not allocated.
- Parameters
i – row
j – column
- Returns
KOKKOS_INLINE_FUNCTION&
- KOKKOS_INLINE_FUNCTION T & value (size_t i, size_t j) const
Same functionality as operator. Included for compatibility with other matar types.
- Parameters
i –
j –
- Returns
KOKKOS_INLINE_FUNCTION&
- KOKKOS_INLINE_FUNCTION CSRArrayKokkos & operator= (const CSRArrayKokkos &temp)
Copy operator.
- Parameters
temp –
- KOKKOS_INLINE_FUNCTION T * pointer () const
Pointer to start of array_ data.
- KOKKOS_INLINE_FUNCTION size_t * get_starts () const
Get the beginning of the start_index_ array.
- KOKKOS_INLINE_FUNCTION size_t dim2 () const
Number of columns.
- Returns
KOKKOS_INLINE_FUNCTION
- KOKKOS_INLINE_FUNCTION size_t dim1 () const
Number of rows.
- Returns
KOKKOS_INLINE_FUNCTION
- KOKKOS_INLINE_FUNCTION T * begin (size_t i)
iterator notation to access the non zero elements of row i. Returns pointer to first element in row i
- Parameters
i – row
- Returns
KOKKOS_INLINE_FUNCTION*
- KOKKOS_INLINE_FUNCTION T * end (size_t i)
Iteator notation to access the non zero elements of row i. Returns pointer first element of the next row.
- Parameters
i –
- Returns
KOKKOS_INLINE_FUNCTION*
- KOKKOS_INLINE_FUNCTION size_t stride (size_t i) const
Get the size of row i. Same functionality as nnz(i) but included for compatiblity.
- Parameters
i –
- Returns
KOKKOS_INLINE_FUNCTION
-
void from_dense(CArrayKokkos<T, Layout, ExecSpace, MemoryTraits> &starts, CArrayKokkos<T, Layout, ExecSpace, MemoryTraits> &columns, CArrayKokkos<T, Layout, ExecSpace, MemoryTraits> &array)
- 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
- KOKKOS_INLINE_FUNCTION size_t nnz () const
get the total number of non zero elements
-
size_t get_col_flat(size_t k)
-
int flat_index(size_t i, size_t j)
-
void to_dense(CArrayKokkos<T, Layout, ExecSpace, MemoryTraits> &A)
-
KOKKOS_INLINE_FUNCTION ~CSRArrayKokkos()
-
CSRArrayKokkos()