ONE - On-device Neural Engine
Loading...
Searching...
No Matches
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 37 of file Allocator.h.

Constructor & Destructor Documentation

◆ Allocator()

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

Definition at line 28 of file Allocator.cc.

29{
30 _base = std::make_unique<uint8_t[]>(capacity);
31
32 VERBOSE(ALLOC) << "allocation capacity: " << capacity << std::endl;
33 VERBOSE(ALLOC) << "base pointer: " << static_cast<void *>(_base.get()) << std::endl;
34}
#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 45 of file Allocator.h.

45{ return _base.get(); }

◆ release()

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

Definition at line 46 of file Allocator.h.

46{ _base.reset(); }

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