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

#include <KokkosJaggedArray.h>

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

Public Member Functions

KOKKOS_FUNCTION JaggedArrayInnerData (T *data, JaggedArrayInnerDim< 3 > dim)
 Constructor. More...
 
KOKKOS_FUNCTION T & operator() (dof_id_type i0, dof_id_type i1, dof_id_type i2) 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, 3)
 

Detailed Description

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

Definition at line 170 of file KokkosJaggedArray.h.

Constructor & Destructor Documentation

◆ JaggedArrayInnerData()

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

Constructor.

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

Definition at line 180 of file KokkosJaggedArray.h.

181  : JaggedArrayInnerDataBase<T, 3>(data, dim)
182  {
183  }
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, 3 >::operator() ( dof_id_type  i0,
dof_id_type  i1,
dof_id_type  i2 
) const
inline

Get an array entry.

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

Definition at line 191 of file KokkosJaggedArray.h.

192  {
193  KOKKOS_ASSERT(i0 < _dim[0]);
194  KOKKOS_ASSERT(i1 < _dim[1]);
195  KOKKOS_ASSERT(i2 < _dim[2]);
196 
197  return _data[i0 + _dim.stride[0] * i1 + _dim.stride[1] * i2];
198  }
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, 3 >::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: