https://mooseframework.inl.gov
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Moose::Kokkos::JaggedArrayInnerData< T, 2 > Class Template Reference

#include <KokkosJaggedArray.h>

Inheritance diagram for Moose::Kokkos::JaggedArrayInnerData< T, 2 >:
[legend]

Public Member Functions

KOKKOS_FUNCTION JaggedArrayInnerData (T *data, JaggedArrayInnerDim< 2 > dim)
 Constructor. More...
 
KOKKOS_FUNCTION T & operator() (dof_id_type i0, dof_id_type i1) const
 Get an array entry. More...
 
KOKKOS_FUNCTION dof_id_type size () const
 Get the total inner array size. More...
 
KOKKOS_FUNCTION dof_id_type n (unsigned int dim) const
 Get the size of a dimension of the inner array. More...
 
KOKKOS_FUNCTION T & operator[] (dof_id_type i) const
 Get an array entry. More...
 

Protected Attributes

T * _data
 Pointer to the inner array data. More...
 
JaggedArrayInnerDim< inner > _dim
 Inner array dimension information. More...
 

Private Member Functions

 usingKokkosJaggedArrayInnerDataBaseMembers (T, 2)
 

Detailed Description

template<typename T>
class Moose::Kokkos::JaggedArrayInnerData< T, 2 >

Definition at line 140 of file KokkosJaggedArray.h.

Constructor & Destructor Documentation

◆ JaggedArrayInnerData()

template<typename T >
KOKKOS_FUNCTION Moose::Kokkos::JaggedArrayInnerData< T, 2 >::JaggedArrayInnerData ( T *  data,
JaggedArrayInnerDim< 2 >  dim 
)
inline

Constructor.

Parameters
dataThe pointer to the inner array data
dimThe inner array dimension information

Definition at line 150 of file KokkosJaggedArray.h.

151  : JaggedArrayInnerDataBase<T, 2>(data, dim)
152  {
153  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:162

Member Function Documentation

◆ n()

KOKKOS_FUNCTION dof_id_type Moose::Kokkos::JaggedArrayInnerDataBase< T, inner >::n ( unsigned int  dim) const
inlineinherited

Get the size of a dimension of the inner array.

Parameters
dimThe dimension index
Returns
The size of the dimension of the inner array

Definition at line 76 of file KokkosJaggedArray.h.

76 { return _dim[dim]; }
JaggedArrayInnerDim< inner > _dim
Inner array dimension information.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:162

◆ operator()()

template<typename T >
KOKKOS_FUNCTION T& Moose::Kokkos::JaggedArrayInnerData< T, 2 >::operator() ( dof_id_type  i0,
dof_id_type  i1 
) const
inline

Get an array entry.

Parameters
i0The first dimension inner array index
i1The second dimension inner array index

Definition at line 160 of file KokkosJaggedArray.h.

161  {
162  KOKKOS_ASSERT(i0 < _dim[0]);
163  KOKKOS_ASSERT(i1 < _dim[1]);
164 
165  return _data[i0 + _dim.stride[0] * i1];
166  }
JaggedArrayInnerDim< inner > _dim
Inner array dimension information.
T * _data
Pointer to the inner array data.

◆ operator[]()

KOKKOS_FUNCTION T& Moose::Kokkos::JaggedArrayInnerDataBase< T, inner >::operator[] ( dof_id_type  i) const
inlineinherited

Get an array entry.

Parameters
iThe dimensionless inner array index

Definition at line 81 of file KokkosJaggedArray.h.

82  {
83  KOKKOS_ASSERT(i < _dim.stride[inner - 1]);
84 
85  return _data[i];
86  }
JaggedArrayInnerDim< inner > _dim
Inner array dimension information.
T * _data
Pointer to the inner array data.

◆ size()

KOKKOS_FUNCTION dof_id_type Moose::Kokkos::JaggedArrayInnerDataBase< T, inner >::size ( ) const
inlineinherited

Get the total inner array size.

Returns
The total inner array size

Definition at line 70 of file KokkosJaggedArray.h.

70 { return _dim.stride[inner - 1]; }
JaggedArrayInnerDim< inner > _dim
Inner array dimension information.

◆ usingKokkosJaggedArrayInnerDataBaseMembers()

template<typename T >
Moose::Kokkos::JaggedArrayInnerData< T, 2 >::usingKokkosJaggedArrayInnerDataBaseMembers ( ,
 
)
private

Member Data Documentation

◆ _data

T* Moose::Kokkos::JaggedArrayInnerDataBase< T, inner >::_data
protectedinherited

Pointer to the inner array data.

Definition at line 92 of file KokkosJaggedArray.h.

◆ _dim

JaggedArrayInnerDim<inner> Moose::Kokkos::JaggedArrayInnerDataBase< T, inner >::_dim
protectedinherited

Inner array dimension information.

Definition at line 96 of file KokkosJaggedArray.h.


The documentation for this class was generated from the following file: