boost::multi::unique_array
A D‐dimensional array that is move only (cannot be copied into another unique_array)
Synopsis
Declared in <boost/multi/array.hpp>
template<
typename T,
boost::multi::dimensionality_type D,
class Alloc>
class unique_array
: public dynamic_array<T, D, Alloc>
Type Aliases
Name |
Description |
Allocator type (returned by |
|
Indexable const‐cursor, pointer‐like objects that multidimensionally indexable (type usually returned by |
|
Random‐access iterator in the leading dimension, in general they dereference to an immutable subarrays of lower dimension ( |
|
For |
|
Subarray immutable reference after binding first index, |
|
Indexable cursor, pointer‐like objects that multidimensionally indexable (type usually returned by |
|
Associalted array value type (generally itself, |
|
Integer type to store dimensionality information (e.g. 1D, 2D, 3D) |
|
Element type ( |
|
The pointer type to a constant element ( |
|
|
|
Pointer‐like type that produces an moved element (r‐value) |
|
Pointer to element type (usually |
|
Reference type to an element (usually |
|
|
(deprecated, use |
|
(deprecated) use |
A type to store the extent of an array (the range of valid indices in the leading dimension), returned from |
|
A type that stores the extents of the array or subarray (returned from |
|
Type to store an index in the leading dimension |
|
Type that represents a range of indices |
|
A tuple type that allows storing |
|
Random‐access iterator in the leading dimension, in general they dereference to a subarray of lower dimension ( |
|
Layout type (generally a strided layout |
|
Iterator in the leading dimension that mark elements as movable |
|
For |
|
Subarray reference after binding first index, |
|
A type to hold the size of an array or subarray (size in the leading dimension) (usually signed) |
|
The value type associated after binding the first index (generally |
Member Functions
Name |
Description |
|
Constructors |
|
Destructor |
Assignment operators |
|
(inherited) Acting on a tuple this is equivalent to .operator()(get<0>(tpl), get<1>(tpl), ...). (Typically, the argument type is of size |
|
yields a const‐element view of the subarray, preventing modification of elements. |
|
yields the back subarray of leading dimension (or element for |
|
returns the base pointer of the array (arithmetic base of the layout, generally a pointer to the first element) |
|
returns an iterator to the beginning in the leading dimension |
|
returns an const‐iterator to the beginning |
|
returns an const‐iterator to the end |
|
produces a subarray of higher dimension by chunking in the leading dimension (if |
|
creates a view of the array with element references with const‐removed |
|
|
materializes an independent, owning |
for |
|
gets a pointer to a contigous range of size |
|
materializes an independent, owning |
|
Subarray of lower dimension that represents the main diagonal of a square array |
|
yields a subarray of the same dimensionally in which the first |
|
An array view in which element references are r‐values |
|
a view with the elements transformed |
|
yields a random‐access range with all the elements of the array (no copies or allocations are made, O(1) operation) |
|
returns an iterator to the end in the leading dimension |
|
|
Deprecated, prefer |
Returns the index extensions (structured cartesian product of half‐open ranges) for all dimensions as an |
|
yields a view of the array that is flattened in the first two leading dimensions |
|
yields a view of the array that is flattened in the first two leading dimensions |
|
yields the front subarray of leading dimension (or element for |
|
returns the allocator that is used to acquire/release memory and to construct/destroy the elements in that memory |
|
returns a cursor pointing to the top corner element of the array |
|
|
|
|
|
returns the internal layout information of the array |
|
returns the maximum number of elements that the vector can hold. |
|
returns an move‐iterator (moves on dereference) to the beginning in the leading dimension |
|
yields a view of the array containing a specific member of original element type |
|
returns an move‐iterator (moves on dereference) to the ending in the leading dimension |
|
yields a subarray whose elements are marked for move |
|
Delete operator |
|
New operators |
|
Address‐of operators |
|
Subarray returning operator (takes multiple parameters, the number of parameters is equal or lower than the number of dimensions, individual arguments can be single indices or ranges) |
|
materializes an independent, owning |
|
Subscript operators (takes multiple parameters, the number of parameters is equal or lower than the number of dimensions, individual arguments can be single indices or ranges) |
|
yields a transpose view (same as |
|
|
|
yields a subarray of higher dimension by splitting the leading dimension into |
|
yields a view of the array where the underlying memory handle is a raw pointer (in general |
|
yields an equivalent subarray with a specific starting index |
|
yields a view of the subarray where elements are reinterpreted as a different type (elements must have compatible size) |
|
resets the array to a new size (or empty) and reclaims the memory. |
|
yields a view of the array with the leading dimension in the reverse order (e.g. |
|
yields a view of the array where the indices are rotated (to the left) (e.g. |
|
Serializes the array shape and elements into |
|
returns the size of the array in the leading dimension |
|
yields a subarray‐view from index |
|
yields a view of the array in which the internal representation is static_cast to another type (and/or pointer) |
|
yields a subarray‐view of the array with skipping |
|
returns the layout internal strides of an array as a tuple |
|
yields an array‐view of the same dimensionality taking the first count subarrays in the leading dimension |
|
yields a transpose view , that exchanges the first two indices |
|
yields a view in which index access is unordered (an arbitrary transposition of indices generally to optimize access) |
|
yields a view of the array where the indices are unrotated (to the right, opposite to |
|
Conversion to |
|
Conversion operators |
|
Conversion to |
|
Conversion to |
|
conversion to |
|
Equality operator |
|
Inequality operator |
|
Less‐than operators (all ordering operations are lexicographical order, subarray by subarray, recursively) |
|
Less‐than‐or‐equal operator |
|
Greater‐than operator |
Using Declarations
Name |
Description |
Acting on a tuple this is equivalent to .operator()(get<0>(tpl), get<1>(tpl), ...). (Typically, the argument type is of size |
|
copies the array into a new independent array (allocates). |
|
yield a array reference of lower dimension with the diagonal elements |
|
Signed integer type to represent difference between indices (usually |
|
Dimensionality value of the array (generally |
|
(inherited) yields an array of the same dimensionality with the first n dropped in the leading dimension. |
|
Element type (generally |
|
Element pointer type (generally |
|
checks if the container has no elements. |
|
returns the extent of the array in the leading dimension |
|
returns the extents of the array (Cartesian product of valid indices) |
|
(inherited) yields a view of the array that is flattened in the first two leading dimensions |
|
(inherited) returns a cursor pointing to the top corner element of the array |
|
Type to store an array index in the leading dimension |
|
Type that describes the extents in the leading dimension |
|
|
|
checks if the container has no elements (same as |
|
returns the layout of the array. |
|
returns the nelems layout (convex hull data size) of the array. |
|
returns the total number of elements. |
|
Subscript operator (takes multiple parameters, the number of parameters is equal or lower than the number of dimensions, individual arguments can be single indices or ranges) |
|
[boost/multi/dynamic_array-00/operator].adoc[ |
Inherited indexed access |
(inherited) yields a transpose view (same as |
|
yields an array view of higher‐dimensionality by partitioning the array in the leading dimensions. |
|
Integer constant with the rank of the array |
|
(inherited) yields a view of the array where the underlying memory handle is a raw pointer (in general T*), useful for lambda kernels. Handler must be convertible with a pointer (e.g. through |
|
(inherited) yields a view of the subarray where elements are reinterpreted as a different type (elements must have compatible size) |
|
(inherited) yields a view of the array where the indices are rotated (to the left) (e.g. |
|
Integer type to represent size in the leading dimension (usually |
|
returns a tuple decribing sizes across all the dimensions of the array. |
|
|
|
(inherited) A subarray‐view from index first to index last (not inclusive) skipping step in the leading dimension |
|
returns the layout's stride (distance between elements in memory) in the leading dimension. |
|
Stride type (generally |
|
yields an array view that skips |
|
Type that represents the layout strides (generally a D‐tuple) |
|
(inherited) yields an array‐view of the same dimensionality taking the first count subarrays in the leading dimension |
|
(inherited) yields a transposed view, that exchanges the first two indices |
|
(inherited) yields a view in which index access is unordered (an arbitrary transposition of indices generally to optimize access) |
|
(inherited) yields a view of the array where the indices are rotated (to the left) (e.g. |
Non-Member Functions
Name |
Description |
yields an array reference marked for move; for subarrays (including r‐value subarrays), its elements are marked as movable, for array values this has the same effect as |
|
yields an array reference marked for move; for subarrays (including r‐value subarrays), its elements are marked as movable, for array values this has the same effect as |
|
yields an array reference marked for move; for subarrays (including r‐value subarrays), its elements are marked as movable, for array values this has the same effect as |
|
Inequality operator |
|
Inequality operator |
|
Equality operator |
|
Equality operator |
|
swaps the contents of subarrays with other (extents must match, doesn't allocate, O(N) operations) |
|
swaps the contents of subarrays with other (extents must match, doesn't allocate, O(N) operations) |
|
swaps the contents of two dynamic arrays (extents must match, doesn't allocate, O(N) operations) |
|
swaps the contents of subarrays with other (extents must match, doesn't allocate, O(N) operations) |
|
swaps the contents of subarrays with other (extents must match, doesn't allocate, O(N) operations) |