24 #ifndef ARM_COMPUTE_GRAPH_BACKENDS_UTILS_H 25 #define ARM_COMPUTE_GRAPH_BACKENDS_UTILS_H 44 template <
typename FunctionType,
typename FunctionNameType,
typename... ParameterType>
47 auto f = std::make_unique<FunctionType>();
48 f->configure(std::forward<ParameterType>(
args)...);
49 return std::make_pair(std::move(f), name);
60 template <
typename FunctionType,
typename FunctionNameType,
typename MemoryManagerType,
typename... ParameterType>
63 ParameterType...
args)
65 auto f = std::make_unique<FunctionType>(mm);
66 f->configure(std::forward<ParameterType>(
args)...);
67 return std::make_pair(std::move(f), name);
79 return (output ==
nullptr) || (input == output);
std::tuple< std::unique_ptr< arm_compute::IFunction >, FunctionNameType > create_named_function(FunctionNameType name, ParameterType... args)
Creates and configures a named function.
bool use_function_weights_manager
Use a weights manager to manage transformed weights.
WeightsManagerContext * weights_management_ctx(Target target)
Gets a weights manager context for a given target.
Copyright (c) 2017-2021 Arm Limited.
bool use_function_memory_manager
Use a memory manager to manage per-function auxilary memory.
std::tuple< std::unique_ptr< arm_compute::IFunction >, FunctionNameType > create_named_memory_managed_function(FunctionNameType name, MemoryManagerType mm, ParameterType... args)
Creates and configures a named function.
bool is_in_place_operation(void *input, void *output)
Checks if an operation is in place.
std::shared_ptr< arm_compute::IMemoryManager > intra_mm
Intra-function memory manager.
const GraphConfig & config() const
Graph configuration accessor.
std::shared_ptr< IMemoryManager > get_memory_manager(GraphContext &ctx, Target target)
Returns the memory manager for a given target.
MemoryManagerContext * memory_management_ctx(Target target)
Gets a memory manager context for a given target.
std::shared_ptr< IWeightsManager > get_weights_manager(GraphContext &ctx, Target target)
Returns the weights manager for a given target.
std::shared_ptr< arm_compute::IWeightsManager > wm
Weights manager.