24.02.1
|
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 193 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 102 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(), arm_compute::cpu::compute_region_coordinate(), pooling_layer_2_nchw_indices(), arm_compute::test::validation::reference::roi_align_layer(), roi_pooling_layer(), scale_bilinear_nchw(), and scale_nearest_neighbour_nchw().
|
inline |
Checks if a string contains a given suffix.
[in] | str | Input string |
[in] | suffix | Suffix to check for |
Definition at line 177 of file Utility.h.
References caffe_mnist_image_extractor::str.
Referenced by arm_compute::graph_utils::get_input_accessor().
|
inline |
Base case of foldl.
Definition at line 133 of file Utility.h.
Referenced by foldl(), and arm_compute::intersect_valid_regions().
|
inline |
|
inline |
Base case of for_each.
Does nothing.
Definition at line 111 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(), CLSymbols::load_default(), GroupedConvolutionMutator::mutate(), 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 122 of file Utility.h.
References GemmTuner::args, and for_each().
|
inline |
Get environment variable as a string.
[in] | env_name | Name of the Environment variable to retrieve |
Definition at line 218 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 87 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 160 of file Utility.h.
Referenced by InstrumentsStats::InstrumentsStats().
|
inline |
Convert string to lower case.
[in] | string | To be converted string. |
Definition at line 204 of file Utility.h.
References arm_compute::mlgo::parser::end().
Referenced by ClScaleKernel::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().