|
| | Array (const Executor &exec, sizeType size) |
| | Creates an uninitialized Array with the given size on an executor.
|
| | Array (const Executor &exec, const ValueType *in, sizeType size, Executor hostExec=SerialExecutor()) |
| | Creates an Array from existing data on the given executor.
|
| | Array (const Executor &exec, sizeType size, ValueType value) |
| | Creates an Array with the given size and initializes all elements to a value.
|
| | Array (const Executor &exec, std::vector< ValueType > in) |
| | Create an Array from a std::vector on a given executor.
|
| | Array (const Executor &exec, const Array< ValueType > &in) |
| | Creates a copy of an Array on the specified executor.
|
| | Array (const Array< ValueType > &rhs) |
| | Creates a copy of another Array on the same executor.
|
| | Array (Array< ValueType > &&rhs) noexcept |
| | Move constructor.
|
| | ~Array () |
| | Destroy the Array object.
|
| template<typename func> |
| void | apply (func f) |
| | Applies a function to each element of the Array.
|
| Array< ValueType > | copyToExecutor (Executor dstExec) const |
| | Creates a copy of the Array on a specified executor.
|
| Array< ValueType > | copyToHost () const |
| | Creates a host-resident copy of the Array.
|
| void | copyToHost (Array< ValueType > &result) |
| | Copies the Array data to a host-resident Array.
|
| Array & | operator[] (const localIdx i)=delete |
| const Array & | operator[] (const localIdx i) const =delete |
| void | operator= (const ValueType &rhs) |
| | Assigns a value to all elements of the Array.
|
| void | operator= (const Array< ValueType > &rhs) |
| | Copies the contents of another Array.
|
| void | resize (const sizeType size) |
| | Resizes the Array.
|
| ValueType * | data () |
| | Returns a pointer to the underlying array data.
|
| const ValueType * | data () const |
| | Returns a pointer to the underlying array data.
|
| const Executor & | exec () const |
| | Returns the executor associated with the Array.
|
| sizeType | size () const |
| | Returns the number of elements in the Array.
|
| label | ssize () const |
| | Returns the number of elements in the Array.
|
| bool | empty () const |
| | Checks whether the Array contains no elements.
|
| View< ValueType > | view () &&=delete |
| View< const ValueType > | view () const &&=delete |
| View< ValueType > | view () & |
| | Returns a view of the Array data.
|
| View< const ValueType > | view () const & |
| | Returns a view of the Array data.
|
| View< ValueType > | view (std::pair< localIdx, localIdx > range) &&=delete |
| View< const ValueType > | view (std::pair< localIdx, localIdx > range) const &&=delete |
| View< ValueType > | view (std::pair< localIdx, localIdx > range) & |
| | Returns a view of a range of the Array.
|
| View< const ValueType > | view (std::pair< localIdx, localIdx > range) const & |
| | Returns a view of a range of the Array.
|
| std::pair< localIdx, localIdx > | range () const |
| | Returns the index range of the Array.
|
template<typename ValueType>
class NeoN::Array< ValueType >
An executor-aware contiguous container for structural and indexing data.
Array is intended for data that is primarily used as a generic collection, particularly for structural, indexing, or other non-arithmetic data.
Unlike Vector, Array does not primarily model numerical quantities or provide vector-style arithmetic semantics. Use Array when the primary purpose of the data is storage and indexed access rather than numerical operations.
- Template Parameters
-
| ValueType | The type of the elements stored in the array. |
Definition at line 37 of file array.hpp.