23.11
|
Pass manager. More...
#include <PassManager.h>
Public Member Functions | |
PassManager () | |
Constructor. More... | |
PassManager (const PassManager &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
PassManager (PassManager &&)=default | |
Default move constructor. More... | |
PassManager & | operator= (const PassManager &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
PassManager & | operator= (PassManager &&)=default |
Default move assignment operator. More... | |
const std::vector< std::unique_ptr< IGraphMutator > > & | passes () const |
Mutation passes accessors. More... | |
IGraphMutator * | pass (size_t index) |
Accessor of a pass at a given index. More... | |
void | append (std::unique_ptr< IGraphMutator > pass, bool conditional=true) |
Appends a mutation pass. More... | |
void | clear () |
Clears all the passes. More... | |
void | run_all (Graph &g) |
Runs all the mutation passes on a given graph. More... | |
void | run_type (Graph &g, IGraphMutator::MutationType type) |
Runs a mutation passes of a specific type on a given graph. More... | |
void | run_index (Graph &g, size_t index) |
Runs a specific mutation pass on a given graph. More... | |
Pass manager.
Responsible for performing the mutating graph passes with a given order
Definition at line 43 of file PassManager.h.
PassManager | ( | ) |
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
void append | ( | std::unique_ptr< IGraphMutator > | pass, |
bool | conditional = true |
||
) |
Appends a mutation pass.
[in] | pass | Pass to append |
[in] | conditional | (Optional) Append pass if true else false. Defaults to true. |
Definition at line 46 of file PassManager.cpp.
References ARM_COMPUTE_LOG_GRAPH_VERBOSE, IGraphMutator::name(), and PassManager::pass().
Referenced by arm_compute::graph::create_default_pass_manager().
void clear | ( | ) |
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.
IGraphMutator * pass | ( | size_t | index | ) |
Accessor of a pass at a given index.
[in] | index | Index of the requested pass |
Definition at line 41 of file PassManager.cpp.
Referenced by PassManager::append(), PassManager::run_all(), PassManager::run_index(), and PassManager::run_type().
const std::vector< std::unique_ptr< IGraphMutator > > & passes | ( | ) | const |
Mutation passes accessors.
Definition at line 36 of file PassManager.cpp.
void run_all | ( | Graph & | g | ) |
Runs all the mutation passes on a given graph.
[in,out] | g | Graph to run the mutations on |
Definition at line 60 of file PassManager.cpp.
References ARM_COMPUTE_LOG_GRAPH_INFO, IGraphMutator::mutate(), IGraphMutator::name(), and PassManager::pass().
void run_index | ( | Graph & | g, |
size_t | index | ||
) |
Runs a specific mutation pass on a given graph.
[in,out] | g | Graph to run the mutation on |
[in] | index | Index of the mutation to execute |
Definition at line 84 of file PassManager.cpp.
References ARM_COMPUTE_LOG_GRAPH_INFO, IGraphMutator::mutate(), IGraphMutator::name(), and PassManager::pass().
void run_type | ( | Graph & | g, |
IGraphMutator::MutationType | type | ||
) |
Runs a mutation passes of a specific type on a given graph.
[in,out] | g | Graph to run the mutation on |
[in] | type | Type of the mutations to execute |
Definition at line 72 of file PassManager.cpp.
References ARM_COMPUTE_LOG_GRAPH_INFO, IGraphMutator::mutate(), IGraphMutator::name(), PassManager::pass(), IGraphMutator::type(), and type.
Referenced by GraphManager::finalize_graph().