class ngraph::runtime::AlignedBuffer

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.

#include <aligned_buffer.hpp>

class AlignedBuffer
{
public:
    // construction

    AlignedBuffer(size_t byte_size, size_t alignment = 64);
    AlignedBuffer();
    AlignedBuffer(AlignedBuffer&& other);

    // methods

    AlignedBuffer& operator = (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\* ();
};

// direct descendants

template <typename T>
class SharedBuffer;