ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::backend::train::MemoryPlannerFactory< Index > Class Template Reference

#include <MemoryPlannerFactory.h>

Public Member Functions

basic::IMemoryPlanner< Index > * create (std::string_view key)
 

Static Public Member Functions

static MemoryPlannerFactory< Index > & get ()
 

Detailed Description

template<typename Index>
class onert::backend::train::MemoryPlannerFactory< Index >

Definition at line 27 of file MemoryPlannerFactory.h.

Member Function Documentation

◆ create()

template<typename Index >
basic::IMemoryPlanner< Index > * onert::backend::train::MemoryPlannerFactory< Index >::create ( std::string_view  key)

Definition at line 32 of file MemoryPlannerFactory.cc.

33{
34 if (key == "FirstFit")
35 {
36 return new FirstFitPlanner<Index>();
37 }
38 else if (key == "Bump")
39 {
40 return new BumpPlanner<Index>();
41 }
42 else if (key == "WIC")
43 {
44 return new WICPlanner<Index>();
45 }
46 return new FirstFitPlanner<Index>(); // Default Planner
47}

◆ get()

template<typename Index >
MemoryPlannerFactory< Index > & onert::backend::train::MemoryPlannerFactory< Index >::get ( )
static

Definition at line 25 of file MemoryPlannerFactory.cc.

26{
27 static MemoryPlannerFactory<Index> instance;
28 return instance;
29}

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