Public Member Functions | Protected Attributes
ngraph::runtime::AlignedBuffer Class Reference

Allocates a block of memory on the specified alignment. The actual size of the allocated memory is larger than the requested size by the alignment, so allocating 1 byte on 64 byte alignment will allocate 65 bytes. More...

#include <aligned_buffer.hpp>

Inheritance diagram for ngraph::runtime::AlignedBuffer:
Inheritance graph
[legend]

Public Member Functions

 AlignedBuffer (size_t byte_size, size_t alignment=64)
 
 AlignedBuffer (AlignedBuffer &&other)
 
AlignedBufferoperator= (AlignedBuffer &&other)
 
size_t size () const
 
void * get_ptr (size_t offset) const
 
void * get_ptr ()
 
const void * get_ptr () const
 
template<typename T >
T * get_ptr ()
 
template<typename T >
const T * get_ptr () const
 
template<typename T >
 operator T* ()
 

Protected Attributes

char * m_allocated_buffer
 
char * m_aligned_buffer
 
size_t m_byte_size
 

Detailed Description

Allocates a block of memory on the specified alignment. The actual size of the allocated memory is larger than the requested size by the alignment, so allocating 1 byte on 64 byte alignment will allocate 65 bytes.


The documentation for this class was generated from the following file: