ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::compiler::BackendResolver Class Reference

#include <BackendResolver.h>

Public Member Functions

const backend::BackendgetBackend (const ir::OperationIndex &index) const
 
void setBackend (const ir::OperationIndex &index, const backend::Backend *backend)
 
bool hasBackend (const ir::OperationIndex &index) const
 
void iterate (const std::function< void(const ir::OperationIndex &, const backend::Backend &)> &fn) const
 

Detailed Description

Definition at line 29 of file BackendResolver.h.

Member Function Documentation

◆ getBackend()

const backend::Backend * onert::compiler::BackendResolver::getBackend ( const ir::OperationIndex index) const
inline

Definition at line 32 of file BackendResolver.h.

33 {
34 return _gen_map.at(index);
35 }

◆ hasBackend()

bool onert::compiler::BackendResolver::hasBackend ( const ir::OperationIndex index) const
inline

Definition at line 42 of file BackendResolver.h.

43 {
44 return _gen_map.find(index) != _gen_map.end();
45 }

◆ iterate()

void onert::compiler::BackendResolver::iterate ( const std::function< void(const ir::OperationIndex &, const backend::Backend &)> &  fn) const
inline

Definition at line 48 of file BackendResolver.h.

49 {
50 for (const auto &[op_index, backend] : _gen_map)
51 {
52 fn(op_index, *backend);
53 }
54 }

◆ setBackend()

void onert::compiler::BackendResolver::setBackend ( const ir::OperationIndex index,
const backend::Backend backend 
)
inline

Definition at line 37 of file BackendResolver.h.

38 {
39 _gen_map[index] = backend;
40 }
loco::GraphInputIndex index(const TFPlaceholder *node)
Definition TFNode.cpp:54

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