|
vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
A multidimensional array of numbers that cannot be written through. More...
#include <vitrio/array/const_array.hpp>
Public Member Functions | |
| const_array () noexcept | |
| Construct an array that holds nothing. | |
| const_array (span< const byte > memory, std::shared_ptr< const void > owner, array_descriptor descriptor) | |
| Construct an array over memory allocated elsewhere. | |
| const_array (const const_array &other)=delete | |
| const_array (const_array &&other) noexcept | |
| const_array & | operator= (const const_array &other)=delete |
| const_array & | operator= (const_array &&other) noexcept |
| const array_descriptor & | get_descriptor () const noexcept |
| Get how the memory is read as an array. | |
| const byte * | get_data () const noexcept |
| Get the memory holding the elements. | |
| const_array | share () const noexcept |
| Make another read-only array over the same memory. | |
Friends | |
| class | array |
A multidimensional array of numbers that cannot be written through.
It is an array whose elements can only be read: it keeps its memory alive in the same way, and it cannot be copied either. The memory may be read-only, or it may be the memory of an array that is still written through elsewhere.
|
noexcept |
Construct an array that holds nothing.
Its descriptor is not initialized and it has no memory.
| vitrio::const_array::const_array | ( | span< const byte > | memory, |
| std::shared_ptr< const void > | owner, | ||
| array_descriptor | descriptor | ||
| ) |
Construct an array over memory allocated elsewhere.
The array keeps owner for as long as it or any array sharing its memory lives. Whatever releasing owner does is how the memory is released, so the memory may come from anywhere.
| memory | The memory holding the elements. |
| owner | What keeps memory alive. Must not be null. |
| descriptor | How memory is read as an array. |
| std::invalid_argument | If owner is null, if descriptor is not initialized, or if memory is not aligned to the elements. |
| std::out_of_range | If an element descriptor addresses lies outside memory. |
|
noexcept |
Get the memory holding the elements.
|
noexcept |
Get how the memory is read as an array.
|
noexcept |
Make another read-only array over the same memory.