ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::backend::basic::Allocator Class Reference

Class to allocate memory. More...

#include <Allocator.h>

Public Member Functions

 Allocator (uint32_t capacity)
 
uint8_t * base () const
 Get memory base pointer.
 
void release ()
 

Detailed Description

Class to allocate memory.

Definition at line 33 of file Allocator.h.

Constructor & Destructor Documentation

◆ Allocator()

onert::backend::basic::Allocator::Allocator ( uint32_t  capacity)

Definition at line 24 of file Allocator.cc.

25{
26 _base = std::make_unique<uint8_t[]>(capacity);
27
28 VERBOSE(ALLOC) << "allocation capacity: " << capacity << std::endl;
29 VERBOSE(ALLOC) << "base pointer: " << static_cast<void *>(_base.get()) << std::endl;
30}
#define VERBOSE(name, lv)
Definition Log.h:71

References VERBOSE.

Member Function Documentation

◆ base()

uint8_t * onert::backend::basic::Allocator::base ( ) const
inline

Get memory base pointer.

Returns
base pointer

Definition at line 41 of file Allocator.h.

41{ return _base.get(); }

◆ release()

void onert::backend::basic::Allocator::release ( )
inline

Definition at line 42 of file Allocator.h.

42{ _base.reset(); }

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