#include <array.h>
Classes | |
class | IteratorTemplate |
Public Types | |
using | ValueType = TYPE |
using | NonConstValueType = typename std::remove_const< TYPE >::type |
using | TYPE_FOR_SIZEOF = typename std::conditional< GENERIC, Char, TYPE >::type |
using | Iterator = IteratorTemplate< StaticArrayInterface > |
using | ConstIterator = IteratorTemplate< const StaticArrayInterface > |
Public Attributes | |
MAXON_METHOD_RESERVE | |
Static Public Attributes | |
static const Bool | GENERIC |
Private Member Functions | |
MAXON_INTERFACE_SIMPLE_VIRTUAL_DERIVED (StaticArrayInterface, MAXON_REFERENCE_COPY_ON_WRITE) | |
Static Private Member Functions | |
static StaticArrayInterface * | Alloc (MAXON_SOURCE_LOCATION_DECLARATION) |
Friends | |
class | StrongCOWRefHandler |
using ValueType = TYPE |
using NonConstValueType = typename std::remove_const<TYPE>::type |
using TYPE_FOR_SIZEOF = typename std::conditional<GENERIC, Char, TYPE>::type |
using Iterator = IteratorTemplate<StaticArrayInterface> |
using ConstIterator = IteratorTemplate<const StaticArrayInterface> |
|
private |
MAXON_METHOD Int GetCount | ( | ) | const |
Gets the number of array elements.
MAXON_FUNCTION Bool IsEmpty | ( | ) | const |
@MAXON_ANNOTATION{default=true}
MAXON_FUNCTION Bool IsPopulated | ( | ) | const |
const MAXON_METHOD TYPE& operator[] | ( | Int | index | ) | const |
MAXON_METHOD ResultRef<TYPE> GetWritable | ( | Int | index | ) |
MAXON_FUNCTION ResultMem Set | ( | Int | index, |
A && | value | ||
) |
MAXON_METHOD Int GetBlock | ( | Int | index, |
SimdBlock< const TYPE > & | block | ||
) | const |
Determines a contiguous, possibly strided block of array elements which contains the element at index
. The returned blocks are guaranteed to form a partition of the array, i.e., no two blocks overlap, and they cover the whole array.
Using this method can greatly reduce the performance penalty of virtual method invocations of the Array interface as only one such invocation has to happen per block, and a block may consist of a relatively large number of elements which can then be accessed directly.
[in] | index | Element index. |
[out] | block | Block which contains the element at index . |
index
- start index. Int GetBlock | ( | Int | index, |
StridedBlock< const TYPE > & | block | ||
) | const |
MAXON_METHOD Result<Int> GetBlock | ( | Int | index, |
SimdBlock< NonConstValueType > & | block | ||
) |
Determines a contiguous, possibly strided writable block of array elements which contains the element at index
. The returned blocks are guaranteed to form a partition of the array, i.e., no two blocks overlap, and they cover the whole array.
Using this method can greatly reduce the performance penalty of virtual method invocations of the Array interface as only one such invocation has to happen per block, and a block may consist of a relatively large number of elements which can then be accessed directly.
[in] | index | Element index. |
[out] | block | Block which contains the element at index . |
index
- start index. @MAXON_ANNOTATION{cowName=GetWritableBlock} Int GetBlock | ( | Int | index, |
StridedBlock< NonConstValueType > & | block | ||
) |
const MAXON_METHOD DataType& GetValueDataType | ( | ) | const |
const MAXON_METHOD PersistentIdGenerator& GetPersistentIdGenerator | ( | ) | const |
BlockIterator<StaticArrayInterface, TYPE, true, false> GetBlocks | ( | ) | const |
BlockIterator<StaticArrayInterface, TYPE, true, true> GetStridedBlocks | ( | ) | const |
Int GetValueSize | ( | ) | const |
MAXON_ADD_TO_CONST_REFERENCE_CLASS | ( | using | Iterator = typename StaticArrayInterface< TYPE >::ConstIterator;using ConstIterator=typename StaticArrayInterface< TYPE >::ConstIterator; | ) |
MAXON_FUNCTION StaticArrayInterface<TYPE>::ConstIterator Begin | ( | ) | const |
Returns an iterator pointing to the first array element.
Iterator Begin | ( | ) |
Returns an iterator pointing to the first array element.
MAXON_FUNCTION StaticArrayInterface<TYPE>::ConstIterator End | ( | ) | const |
Returns an iterator pointing one behind the last array element.
Iterator End | ( | ) |
Returns an iterator pointing one behind the last array element.
|
staticprivate |
|
friend |
MAXON_METHOD_RESERVE |
|
static |