21.05
|
Namespaces | |
detail | |
Functions | |
template<std::size_t N, typename Iterator > | |
std::array< typename std::iterator_traits< Iterator >::value_type, N > | make_array (Iterator first, Iterator last) |
template<typename DataType , typename RangeType = DataType> | |
DataType | clamp (const DataType &n, const DataType &lower=std::numeric_limits< RangeType >::lowest(), const DataType &upper=std::numeric_limits< RangeType >::max()) |
Performs clamping among a lower and upper value. More... | |
template<typename F > | |
void | for_each (F &&) |
Base case of for_each. More... | |
template<typename F , typename T , typename... Ts> | |
void | for_each (F &&func, T &&arg, Ts &&... args) |
Call the function for each of the arguments. More... | |
template<typename F , typename T > | |
T && | foldl (F &&, T &&value) |
Base case of foldl. More... | |
template<typename F , typename T , typename U , typename... Us> | |
auto | foldl (F &&func, T &&initial, U &&value, Us &&... values) -> decltype(func(std::forward< T >(initial), std::forward< U >(value))) |
Fold left. More... | |
template<typename T > | |
std::vector< size_t > | sort_indices (const std::vector< T > &v) |
Perform an index sort of a given vector. More... | |
bool | endswith (const std::string &str, const std::string &suffix) |
Checks if a string contains a given suffix. More... | |
bool | check_aligned (void *ptr, const size_t alignment) |
Checks if a pointer complies with a given alignment. More... | |
std::string | tolower (std::string string) |
Convert string to lower case. More... | |
std::string | getenv (const std::string &env_name) |
Get environment variable as a string. More... | |
|
inline |
Checks if a pointer complies with a given alignment.
[in] | ptr | Pointer to check |
[in] | alignment | Alignment value |
Definition at line 194 of file Utility.h.
Referenced by TensorAllocator::import_memory(), and arm_compute::test::validation::TEST_CASE().
|
inline |
Performs clamping among a lower and upper value.
[in] | n | Value to clamp. |
[in] | lower | Lower threshold. |
[in] | upper | Upper threshold. |
Definition at line 101 of file Utility.h.
Referenced by arm_compute::helpers::tensor_transform::calculate_end_on_index(), arm_compute::helpers::tensor_transform::calculate_start_on_index(), clamp_to_border_with_size(), clamp_to_border_with_size_quantized(), arm_compute::compute_region_coordinate(), Qasymm8QuantizationHelper< QUANTIZED_TYPE >::quantize(), arm_compute::test::validation::reference::roi_align_layer(), and roi_pooling_layer().
|
inline |
Checks if a string contains a given suffix.
[in] | str | Input string |
[in] | suffix | Suffix to check for |
Definition at line 178 of file Utility.h.
References caffe_data_extractor::str.
Referenced by arm_compute::graph_utils::get_input_accessor().
|
inline |
Base case of foldl.
Definition at line 132 of file Utility.h.
Referenced by foldl(), and arm_compute::intersect_valid_regions().
|
inline |
Fold left.
[in] | func | Function to be called |
[in] | initial | Initial value |
[in] | value | Argument passed to the function |
[in] | values | Remaining arguments |
Definition at line 145 of file Utility.h.
|
inline |
Base case of for_each.
Does nothing.
Definition at line 110 of file Utility.h.
Referenced by TensorShape::broadcast_shape(), ITensorInfo::broadcast_shape_and_valid_region(), arm_compute::graph::detail::call_all_input_node_accessors(), arm_compute::graph::detail::call_all_output_node_accessors(), ConcatLayer::ConcatLayer(), for_each(), GroupedConvolutionMutator::mutate(), CLSoftmaxLayerGeneric< IS_LOG >::run(), StackLayer::StackLayer(), SchedulerClock< output_timestamps >::test_start(), SchedulerClock< output_timestamps >::test_stop(), and arm_compute::update_window_and_padding().
|
inline |
Call the function for each of the arguments.
[in] | func | Function to be called |
[in] | arg | Argument passed to the function |
[in] | args | Remaining arguments |
Definition at line 121 of file Utility.h.
References GemmTuner::args, for_each(), and func.
|
inline |
Get environment variable as a string.
[in] | env_name | Name of the Environment variable to retrieve |
Definition at line 222 of file Utility.h.
References ARM_COMPUTE_UNUSED.
std::array<typename std::iterator_traits<Iterator>::value_type, N> arm_compute::utility::make_array | ( | Iterator | first, |
Iterator | last | ||
) |
Definition at line 86 of file Utility.h.
References ARM_COMPUTE_UNUSED, and arm_compute::utility::detail::make_array().
std::vector<size_t> arm_compute::utility::sort_indices | ( | const std::vector< T > & | v | ) |
Perform an index sort of a given vector.
[in] | v | Vector to sort |
Definition at line 157 of file Utility.h.
Referenced by InstrumentsStats::InstrumentsStats().
|
inline |
Convert string to lower case.
[in] | string | To be converted string. |
Definition at line 205 of file Utility.h.
References arm_compute::mlgo::parser::end().
Referenced by HeuristicTree::add_branch(), ClScaleKernel::configure(), CLRemapKernel::configure(), arm_compute::graph::Convolution_method_from_name(), arm_compute::data_layout_from_name(), arm_compute::data_type_from_name(), arm_compute::graph::depthwise_convolution_method_from_name(), arm_compute::lower_string(), arm_compute::utils::operator>>(), CommandLineParser::parse(), arm_compute::graph::target_from_name(), and arm_compute::tuner_mode_from_name().