21 #include "ngraph/util.hpp"
45 size_t size()
const {
return m_byte_size; }
46 void* get_ptr(
size_t offset)
const {
return m_aligned_buffer + offset; }
47 void* get_ptr() {
return m_aligned_buffer; }
48 const void* get_ptr()
const {
return m_aligned_buffer; }
52 return reinterpret_cast<T*
>(m_aligned_buffer);
55 const T* get_ptr()
const
57 return reinterpret_cast<const T*
>(m_aligned_buffer);
61 explicit operator T*()
71 char* m_allocated_buffer;
72 char* m_aligned_buffer;
84 "AttributeAdapter<std::shared_ptr<runtime::AlignedBuffer>>", 0};
An AttributeAdapter "captures" an attribute as an AT& and makes it available as a ValueAccessor<VAT>.
Definition: attribute_adapter.hpp:171
Definition: attribute_adapter.hpp:79
Allocates a block of memory on the specified alignment. The actual size of the allocated memory is la...
Definition: aligned_buffer.hpp:32
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28