|
| | array_descriptor () noexcept |
| | Construct a descriptor that describes nothing.
|
| | array_descriptor (std::vector< std::size_t > extents, std::vector< std::ptrdiff_t > strides, std::ptrdiff_t offset, numerical_type data_type) |
| | Construct a descriptor from its components.
|
|
| array_descriptor (const array_descriptor &other) |
|
| array_descriptor (array_descriptor &&other) noexcept |
|
array_descriptor & | operator= (const array_descriptor &other) |
|
array_descriptor & | operator= (array_descriptor &&other) noexcept |
| span< const std::size_t > | get_extents () const noexcept |
| | Get the number of elements along each axis.
|
| span< const std::ptrdiff_t > | get_strides () const noexcept |
| | Get the distance between consecutive elements along each axis.
|
| std::ptrdiff_t | get_offset () const noexcept |
| | Get the position of the element at the origin.
|
| numerical_type | get_data_type () const noexcept |
| | Get the type of the elements.
|
How a block of memory is read as a multidimensional array.
A descriptor states the extents of the array, where each of its elements is within the memory, and the type of the elements. It does not refer to any memory itself.
The element at index (i0,i1,...) is offset+i0*strides[0]+i1*strides[1]+... elements after the first byte of the memory. Strides and the offset are counted in elements, not in bytes. A stride may be negative, as long as the offset keeps every element at or after the first byte.
- See also
- make_contiguous_array_descriptor