Fixed-size 1D array. More...
Public Types | |
| using | value_type = T |
| using | size_type = Int32 |
| using | difference_type = std::ptrdiff_t |
| using | reference = value_type& |
| using | const_reference = const value_type& |
| using | pointer = value_type* |
| using | const_pointer = const value_type* |
| using | iterator = typename std::array<T, NbElement>::iterator |
| using | const_iterator = typename std::array<T, NbElement>::const_iterator |
Public Member Functions | |
| constexpr | FixedArray () |
| Creates an array by initializing elements with the default constructor of T. | |
| constexpr | FixedArray (std::array< T, NbElement > x) |
| Creates an array by initializing elements with x. | |
| constexpr FixedArray< T, NbElement > & | operator= (std::array< T, NbElement > x) |
| Copies x into the instance. | |
| constexpr __host__ __device__ T & | operator[] (Int32 index) |
| Value of the i-th element. | |
| constexpr __host__ __device__ const T & | operator[] (Int32 index) const |
| Value of the i-th element. | |
| constexpr __host__ __device__ SmallSpan< T, NbElement > | span () |
| Modifiable view of the array. | |
| constexpr __host__ __device__ SmallSpan< const T, NbElement > | span () const |
| Non-modifiable view of the array. | |
| constexpr __host__ __device__ ArrayView< T > | view () |
| Modifiable view of the array. | |
| constexpr __host__ __device__ ConstArrayView< T > | view () const |
| Non-modifiable view of the array. | |
| constexpr __host__ __device__ const T * | data () const |
| constexpr __host__ __device__ T * | data () |
| constexpr iterator | begin () |
| Iterator to the beginning of the array. | |
| constexpr iterator | end () |
| Iterator to the end of the array. | |
| constexpr const_iterator | begin () const |
| Constant iterator to the beginning of the array. | |
| constexpr const_iterator | end () const |
| Constant iterator to the end of the array. | |
Static Public Member Functions | |
| static constexpr Int32 | size () |
| Number of elements in the array. | |
Private Attributes | |
| std::array< T, NbElement > | m_value |
Fixed-size 1D array.
This class is similar to std::array with the following differences:
This class also provides conversions to ArrayView, ConstArrayView and SmallSpan.
Definition at line 45 of file arccore/src/base/arccore/base/FixedArray.h.
| using Arcane::FixedArray< T, NbElement >::const_iterator = typename std::array<T, NbElement>::const_iterator |
Definition at line 60 of file arccore/src/base/arccore/base/FixedArray.h.
| using Arcane::FixedArray< T, NbElement >::const_pointer = const value_type* |
Definition at line 57 of file arccore/src/base/arccore/base/FixedArray.h.
| using Arcane::FixedArray< T, NbElement >::const_reference = const value_type& |
Definition at line 55 of file arccore/src/base/arccore/base/FixedArray.h.
| using Arcane::FixedArray< T, NbElement >::difference_type = std::ptrdiff_t |
Definition at line 53 of file arccore/src/base/arccore/base/FixedArray.h.
| using Arcane::FixedArray< T, NbElement >::iterator = typename std::array<T, NbElement>::iterator |
Definition at line 59 of file arccore/src/base/arccore/base/FixedArray.h.
| using Arcane::FixedArray< T, NbElement >::pointer = value_type* |
Definition at line 56 of file arccore/src/base/arccore/base/FixedArray.h.
| using Arcane::FixedArray< T, NbElement >::reference = value_type& |
Definition at line 54 of file arccore/src/base/arccore/base/FixedArray.h.
| using Arcane::FixedArray< T, NbElement >::size_type = Int32 |
Definition at line 52 of file arccore/src/base/arccore/base/FixedArray.h.
| using Arcane::FixedArray< T, NbElement >::value_type = T |
Definition at line 51 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Creates an array by initializing elements with the default constructor of T.
Definition at line 65 of file arccore/src/base/arccore/base/FixedArray.h.
Referenced by operator=().
|
inlineconstexpr |
Creates an array by initializing elements with x.
Definition at line 69 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Iterator to the beginning of the array.
Definition at line 110 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Constant iterator to the beginning of the array.
Definition at line 114 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Definition at line 102 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Definition at line 101 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Iterator to the end of the array.
Definition at line 112 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Constant iterator to the end of the array.
Definition at line 116 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Copies x into the instance.
Definition at line 73 of file arccore/src/base/arccore/base/FixedArray.h.
References FixedArray().
|
inlineconstexpr |
Value of the i-th element.
Definition at line 82 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Value of the i-th element.
Definition at line 88 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlinestaticconstexpr |
Number of elements in the array.
Definition at line 105 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Modifiable view of the array.
Definition at line 94 of file arccore/src/base/arccore/base/FixedArray.h.
Referenced by Arcane::MshParallelMeshReader::_readAndCheck().
|
inlineconstexpr |
Non-modifiable view of the array.
Definition at line 96 of file arccore/src/base/arccore/base/FixedArray.h.
|
inlineconstexpr |
Modifiable view of the array.
Definition at line 98 of file arccore/src/base/arccore/base/FixedArray.h.
Referenced by Arcane::MshParallelMeshReader::_readElementsFromFile(), Arcane::MshParallelMeshReader::_readEntities(), Arcane::MshParallelMeshReader::_readNodesFromFile(), Arcane::MshParallelMeshReader::_readPeriodic(), Arcane::AMRZonePosition::cellsInPatch(), Arcane::CartesianMeshAMRPatchMng::coarsen(), Arcane::CartesianMeshAMRPatchMng::createSubLevel(), Arcane::Process::execute(), Arcane::MshParallelMeshReader::readMeshFromMshFile(), Arcane::CartesianMeshAMRPatchMng::refine(), and Arcane::AMRZonePosition::toAMRPatchPosition().
|
inlineconstexpr |
Non-modifiable view of the array.
Definition at line 100 of file arccore/src/base/arccore/base/FixedArray.h.
|
private |
Definition at line 120 of file arccore/src/base/arccore/base/FixedArray.h.