Mutable view on a contiguous memory region containing fixed-size elements. More...
Public Types | |
| using | SpanType = Span<std::byte> |
Public Member Functions | |
| constexpr | MutableMemoryView (SpanType bytes) |
| template<typename DataType> | |
| constexpr | MutableMemoryView (Span< DataType > v) |
| template<typename DataType> | |
| constexpr | MutableMemoryView (ArrayView< DataType > v) |
| template<typename DataType> | |
| constexpr | MutableMemoryView (ArrayView< DataType > v, Int32 nb_component) |
| template<typename DataType> | |
| constexpr | MutableMemoryView (Span< DataType > v, Int32 nb_component) |
| template<typename DataType> | |
| constexpr MutableMemoryView & | operator= (Span< DataType > v) |
| constexpr | operator ConstMemoryView () const |
| constexpr SpanType | bytes () const |
| View in byte form. | |
| constexpr 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 MutableMemoryView | subView (Int64 begin_index, Int64 nb_element) const |
| Sub-view starting from index begin_index. | |
| constexpr SpanType | span () const |
| constexpr Int64 | size () const |
Private Member Functions | |
| constexpr | MutableMemoryView (Span< 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 | |
| MutableMemoryView | makeMutableMemoryView (void *ptr, Int32 datatype_size, Int64 nb_element) |
| Creates a mutable memory view. | |
Mutable view on a contiguous memory region containing fixed-size elements.
The makeMutableMemoryView() functions allow creating instances of this class.
Definition at line 157 of file arccore/src/base/arccore/base/MemoryView.h.
| using Arcane::MutableMemoryView::SpanType = Span<std::byte> |
Definition at line 164 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineexplicitconstexpr |
Definition at line 169 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineexplicitconstexpr |
Definition at line 174 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineexplicitconstexpr |
Definition at line 177 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineexplicitconstexpr |
Definition at line 180 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 183 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexprprivate |
Definition at line 204 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
View in byte form.
Definition at line 217 of file arccore/src/base/arccore/base/MemoryView.h.
Referenced by Arcane::DataSynchronizeDispatcher::beginSynchronize(), Arcane::Accelerator::Cuda::CudaMemoryCopier::copy(), Arcane::Accelerator::Hip::HipMemoryCopier::copy(), Arcane::Accelerator::Sycl::SyclMemoryCopier::copy(), Arcane::MemoryUtils::copyHost(), Arcane::MultiDataSynchronizeBuffer::copySendAsync(), Arcane::MemoryUtils::copyWithIndexedDestination(), Arcane::MemoryUtils::copyWithIndexedSource(), Arcane::MemoryUtils::copyWithIndexedSource(), Arcane::MemoryUtils::fill(), Arcane::MemoryUtils::fillIndexed(), and makeMutableMemoryView.
|
inlineconstexpr |
Pointer to the memory region.
Definition at line 220 of file arccore/src/base/arccore/base/MemoryView.h.
Referenced by 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(), and Arcane::MultiDataSynchronizeBuffer::copySendAsync().
|
inlineconstexpr |
Size of the associated data type (1 by default).
Definition at line 226 of file arccore/src/base/arccore/base/MemoryView.h.
Referenced by Arcane::MemoryUtils::copyWithIndexedDestination(), Arcane::MemoryUtils::copyWithIndexedSource(), Arcane::MemoryUtils::copyWithIndexedSource(), Arcane::MemoryUtils::fill(), Arcane::MemoryUtils::fillIndexed(), and Arcane::DataSynchronizeBufferBase::BufferInfo::setGlobalBuffer().
|
inlineconstexpr |
Number of elements.
Definition at line 223 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 212 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 194 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 242 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Definition at line 239 of file arccore/src/base/arccore/base/MemoryView.h.
|
inlineconstexpr |
Sub-view starting from index begin_index.
Definition at line 229 of file arccore/src/base/arccore/base/MemoryView.h.
|
friend |
Creates a mutable 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 26 of file MemoryView.cc.
References bytes().
|
private |
Definition at line 246 of file arccore/src/base/arccore/base/MemoryView.h.
|
private |
Definition at line 248 of file arccore/src/base/arccore/base/MemoryView.h.
|
private |
Definition at line 247 of file arccore/src/base/arccore/base/MemoryView.h.