|
using | chunk_type = FieldMem< ElementType, IdxRangeType, MemSpace > |
| Type describing the object which can be extracted from this VectorFieldMem using the get<> function. More...
|
|
using | Allocator = ddc::KokkosAllocator< ElementType, MemSpace > |
| The type of allocator that will be used to allocate the data.
|
|
using | span_type = VectorField< ElementType, IdxRangeType, NDTag, MemSpace, std::experimental::layout_right > |
| A type which can hold a reference to this VectorFieldMem. More...
|
|
using | view_type = VectorField< const ElementType, IdxRangeType, NDTag, MemSpace, std::experimental::layout_right > |
| A type which can hold a constant reference to this VectorFieldMem. More...
|
|
using | discrete_domain_type = typename base_type::discrete_domain_type |
| The type of the index range on which the field is defined. More...
|
|
using | index_range_type = discrete_domain_type |
| The IdxRange on which the fields in this object are defined.
|
|
using | memory_space = typename chunk_type::memory_space |
| The type of the memory space where the field is saved (CPU vs GPU).
|
|
template<class ElementType, class IdxRangeType, class NDTag, class MemSpace>
class VectorFieldMem< ElementType, IdxRangeType, NDTag, MemSpace >
Pre-declaration of VectorFieldMem.
A class which describes the storage for a vector field.
A class which describes the storage for a vector field. In other words a class which maps a position on an index range to a vector (x,y,z,...). This is done by storing the values at the positions in individual FieldMems.
- Template Parameters
-
ElementType | The data type of a scalar element of the vector field. |
IdxRangeType | |
NDTag | A NDTag describing the dimensions described by the scalar elements of a vector field element. |
MemSpace | The type describing where the memory is allocated. See DDC. |
template<class ElementType , class IdxRangeType , class NDTag , class MemSpace >
using VectorFieldMem< ElementType, IdxRangeType, NDTag, MemSpace >::chunk_type = FieldMem<ElementType, IdxRangeType, MemSpace> |
Type describing the object which can be extracted from this VectorFieldMem using the get<> function.
This is a DDC keyword used to make this class interchangeable with Field. In DDC FieldMem types are referred to as Chunk types and Field types are referred to as ChunkSpan/ChunkView.
template<class ElementType , class IdxRangeType , class NDTag , class MemSpace >
Get a constant reference to this vector field.
This function is designed to match the equivalent function in DDC. In Gysela it should not be called directly. Instead the global function get_const_field should be used.
- Returns
- A constant reference to this vector field.
template<class ElementType , class IdxRangeType , class NDTag , class MemSpace >
Get a constant reference to this vector field.
This function is designed to match the equivalent function in DDC. In Gysela it should not be called directly. Instead the global function get_field should be used.
- Returns
- A constant reference to this vector field.
template<class ElementType , class IdxRangeType , class NDTag , class MemSpace >
Get a modifiable reference to this vector field.
This function is designed to match the equivalent function in DDC. In Gysela it should not be called directly. Instead the global function get_field should be used.
- Returns
- A modifiable reference to this vector field.
template<class ElementType , class IdxRangeType , class NDTag , class MemSpace >
template<class... ODDims, class = std::enable_if_t<sizeof...(ODDims) != 1>>
element_type VectorFieldMem< ElementType, IdxRangeType, NDTag, MemSpace >::operator() |
( |
Idx< ODDims... > const & |
delems | ) |
const |
|
inlinenoexcept |
Element access using a multi-dimensional Idx.
- Parameters
-
delems | discrete coordinates |
- Returns
- copy of this element
template<class ElementType , class IdxRangeType , class NDTag , class MemSpace >
template<class... QueryDDims>
auto VectorFieldMem< ElementType, IdxRangeType, NDTag, MemSpace >::operator[] |
( |
Idx< QueryDDims... > const & |
slice_spec | ) |
const |
|
inline |
Slice out some dimensions.
Get the VectorFieldMem on the reduced index range which is obtained by indexing the dimensions QueryDDims at the position slice_spec.
- Parameters
-
[in] | slice_spec | The slice describing the index range of interest. |
- Returns
- A constant reference to the vector field on the sliced index range.
template<class ElementType , class IdxRangeType , class NDTag , class MemSpace >
template<class... QueryDDims>
auto VectorFieldMem< ElementType, IdxRangeType, NDTag, MemSpace >::operator[] |
( |
Idx< QueryDDims... > const & |
slice_spec | ) |
|
|
inline |
Slice out some dimensions.
Get the VectorFieldMem on the reduced index range which is obtained by indexing the dimensions QueryDDims at the position slice_spec.
- Parameters
-
[in] | slice_spec | The slice describing the index range of interest. |
- Returns
- A modifiable reference to the vector field on the sliced index range.
template<class ElementType , class IdxRangeType , class NDTag , class MemSpace >
template<class... QueryDDims>
auto VectorFieldMem< ElementType, IdxRangeType, NDTag, MemSpace >::operator[] |
( |
IdxRange< QueryDDims... > const & |
oidx_range | ) |
const |
|
inline |
Slice out some dimensions.
Get the VectorFieldMem on the reduced index range passed as an argument.
- Parameters
-
[in] | oidx_range | The index range of interest. |
- Returns
- A modifiable reference to the vector field on the sliced index range.
template<class ElementType , class IdxRangeType , class NDTag , class MemSpace >
template<class... QueryDDims>
auto VectorFieldMem< ElementType, IdxRangeType, NDTag, MemSpace >::operator[] |
( |
IdxRange< QueryDDims... > const & |
oidx_range | ) |
|
|
inline |
Slice out some dimensions.
Get the VectorFieldMem on the reduced index range passed as an argument.
- Parameters
-
[in] | oidx_range | The index range of interest. |
- Returns
- A modifiable reference to the vector field on the sliced index range.