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

#include <KokkosJaggedArray.h>

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

Public Member Functions

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

Detailed Description

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

Definition at line 112 of file KokkosJaggedArray.h.

Constructor & Destructor Documentation

◆ JaggedArrayInnerData()

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

Constructor.

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

Definition at line 122 of file KokkosJaggedArray.h.

123  : JaggedArrayInnerDataBase<T, 1>(data, dim)
124  {
125  }
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, 1 >::operator() ( dof_id_type  i0) const
inline

Get an array entry.

Parameters
i0The first dimension inner array index

Definition at line 131 of file KokkosJaggedArray.h.

132  {
133  KOKKOS_ASSERT(i0 < _dim[0]);
134 
135  return _data[i0];
136  }
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, 1 >::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: