Constant view on a contiguous memory region containing fixed-size elements. More...
Public Types | |
| using | SpanType = Span<const std::byte> |
Public Member Functions | |
| constexpr | ConstMemoryView (Span< const std::byte > bytes) |
| template<typename DataType> | |
| constexpr | ConstMemoryView (Span< DataType > v) |
| template<typename DataType> | |
| constexpr | ConstMemoryView (Span< const DataType > v) |
| template<typename DataType> | |
| constexpr | ConstMemoryView (ConstArrayView< DataType > v) |
| template<typename DataType> | |
| constexpr | ConstMemoryView (ArrayView< DataType > v) |
| template<typename DataType> | |
| constexpr | ConstMemoryView (ConstArrayView< DataType > v, Int32 nb_component) |
| template<typename DataType> | |
| constexpr | ConstMemoryView (ArrayView< DataType > v, Int32 nb_component) |
| template<typename DataType> | |
| constexpr | ConstMemoryView (Span< DataType > v, Int32 nb_component) |
| template<typename DataType> | |
| constexpr | ConstMemoryView (Span< const DataType > v, Int32 nb_component) |
| template<typename DataType> | |
| constexpr ConstMemoryView & | operator= (Span< DataType > v) |
| constexpr SpanType | bytes () const |
| View in byte form. | |
| constexpr const std::byte * | data () const |
| Pointer to the memory region. | |
| constexpr Int64 | nbElement () const |
| Number of elements. | |
| constexpr Int32 | datatypeSize () const |
| Size of the associated data type (1 by default). | |
| constexpr ConstMemoryView | subView (Int64 begin_index, Int64 nb_element) const |
| Sub-view starting from index begin_index and containing nb_element. | |
| SpanType | span () const |
| View converted to a Span. | |
| constexpr Int64 | size () const |
Public Attributes | |
| friend | MutableMemoryView |
Private Member Functions | |
| constexpr | ConstMemoryView (Span< const std::byte > bytes, Int32 datatype_size, Int64 nb_element) |
Private Attributes | |
| SpanType | m_bytes |
| Int64 | m_nb_element = 0 |
| Int32 | m_datatype_size = 0 |
Friends | |
| ConstMemoryView | makeConstMemoryView (const void *ptr, Int32 datatype_size, Int64 nb_element) |
| Creates a read-only memory view. | |
Constant view on a contiguous memory region containing fixed-size elements.
The makeConstMemoryView() functions allow creating instances of this class.
Definition at line 38 of file arccore/src/base/arccore/base/MemoryView.h.
| using Arcane::ConstMemoryView::SpanType = Span<const std::byte> |
Definition at line 45 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineexplicitconstexpr |
Definition at line 51 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineexplicitconstexpr |
Definition at line 56 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineexplicitconstexpr |
Definition at line 59 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineexplicitconstexpr |
Definition at line 62 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineexplicitconstexpr |
Definition at line 65 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 68 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 71 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 74 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 78 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexprprivate |
Definition at line 99 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
View in byte form.
Definition at line 108 of file arccore/src/base/arccore/base/MemoryView.h.
Referenced by Arcane::VariablePrivate::computeComparisonHashCollective(), Arcane::Accelerator::Cuda::CudaMemoryCopier::copy(), Arcane::Accelerator::Hip::HipMemoryCopier::copy(), Arcane::Accelerator::Sycl::SyclMemoryCopier::copy(), Arcane::Accelerator::Cuda::CudaRunQueueStream::copyMemory(), Arcane::Accelerator::Hip::HipRunQueueStream::copyMemory(), Arcane::Accelerator::Sycl::SyclRunQueueStream::copyMemory(), Arcane::MultiDataSynchronizeBuffer::copyReceiveAsync(), Arcane::SingleDataSynchronizeBuffer::finalizeSynchronize(), makeConstMemoryView, Arcane::Accelerator::Cuda::CudaRunQueueStream::prefetchMemory(), and Arcane::Accelerator::Hip::HipRunQueueStream::prefetchMemory().
|
inlineconstexpr |
Pointer to the memory region.
Definition at line 111 of file arccore/src/base/arccore/base/MemoryView.h.
Referenced by Arcane::VtkHdfV2DataWriter::_writeDataSetGeneric(), Arcane::Accelerator::Cuda::CudaMemoryCopier::copy(), Arcane::Accelerator::Hip::HipMemoryCopier::copy(), Arcane::Accelerator::Sycl::SyclMemoryCopier::copy(), Arcane::Accelerator::Hip::HipRunQueueStream::copyMemory(), and Arcane::MultiDataSynchronizeBuffer::copyReceiveAsync().
|
inlineconstexpr |
Size of the associated data type (1 by default).
Definition at line 117 of file arccore/src/base/arccore/base/MemoryView.h.
Referenced by Arcane::VtkHdfV2DataWriter::_writeDataSetGeneric().
|
inlineconstexpr |
Number of elements.
Definition at line 114 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 89 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 134 of file arccore/src/base/arccore/base/MemoryView.h.
|
inline |
View converted to a Span.
Definition at line 131 of file arccore/src/base/arccore/base/MemoryView.h.
References span().
Referenced by span().
|
inlineconstexpr |
Sub-view starting from index begin_index and containing nb_element.
Definition at line 120 of file arccore/src/base/arccore/base/MemoryView.h.
|
friend |
Creates a read-only memory view.
| ptr | address of the memory region. |
| datatype_size | size (in bytes) of the data type. |
| nb_element | number of elements in the view. |
The memory region will have a size of datatype_size * nb_element bytes.
Definition at line 36 of file MemoryView.cc.
References bytes().
|
private |
Definition at line 138 of file arccore/src/base/arccore/base/MemoryView.h.
|
private |
Definition at line 140 of file arccore/src/base/arccore/base/MemoryView.h.
|
private |
Definition at line 139 of file arccore/src/base/arccore/base/MemoryView.h.
| friend Arcane::ConstMemoryView::MutableMemoryView |
Definition at line 46 of file arccore/src/base/arccore/base/MemoryView.h.