Compute Library
Utility.h File Reference
#include "arm_compute/core/Error.h"
#include <algorithm>
#include <array>
#include <limits>
#include <numeric>
#include <vector>

Go to the source code of this file.


 Copyright (c) 2017-2022 Arm Limited.


template<std::size_t... S, typename Iterator , typename T = std::array<typename std::iterator_traits<Iterator>::value_type, sizeof...(S)>>
make_array (Iterator first, index_sequence< S... >)
template<std::size_t N, typename Iterator >
std::array< typename std::iterator_traits< Iterator >::value_type, Nmake_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...