ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::train::MemoryPlannerFactory< Index > Class Template Reference

#include <MemoryPlannerFactory.h>

Public Member Functions

basic::IMemoryPlanner< Index > * create (const std::string &key)
 

Static Public Member Functions

static MemoryPlannerFactory< Index > & get ()
 

Detailed Description

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

Definition at line 31 of file MemoryPlannerFactory.h.

Member Function Documentation

◆ create()

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

Definition at line 36 of file MemoryPlannerFactory.cc.

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

◆ get()

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

Definition at line 29 of file MemoryPlannerFactory.cc.

30{
31 static MemoryPlannerFactory<Index> instance;
32 return instance;
33}

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