|
template<typename S , typename T > |
constexpr auto | DIV_CEIL (S val, T m) -> decltype((val+m - 1)/m) |
| Calculate the rounded up quotient of val / m. More...
|
|
template<typename S , typename T > |
auto | ceil_to_multiple (S value, T divisor) -> decltype(((value+divisor - 1)/divisor) *divisor) |
| Computes the smallest number larger or equal to value that is a multiple of divisor. More...
|
|
template<typename S , typename T > |
auto | floor_to_multiple (S value, T divisor) -> decltype((value/divisor) *divisor) |
| Computes the largest number smaller or equal to value that is a multiple of divisor. More...
|
|
std::string | read_file (const std::string &filename, bool binary) |
| Load an entire file in memory. More...
|
|
size_t | data_size_from_type (DataType data_type) |
| The size in bytes of the data type. More...
|
|
size_t | pixel_size_from_format (Format format) |
| The size in bytes of the pixel format. More...
|
|
size_t | element_size_from_data_type (DataType dt) |
| The size in bytes of the data type. More...
|
|
DataType | data_type_from_format (Format format) |
| Return the data type used by a given single-planar pixel format. More...
|
|
int | plane_idx_from_channel (Format format, Channel channel) |
| Return the plane index of a given channel given an input format. More...
|
|
int | channel_idx_from_format (Format format, Channel channel) |
| Return the channel index of a given channel given an input format. More...
|
|
size_t | num_planes_from_format (Format format) |
| Return the number of planes for a given format. More...
|
|
size_t | num_channels_from_format (Format format) |
| Return the number of channels for a given single-planar pixel format. More...
|
|
DataType | get_promoted_data_type (DataType dt) |
| Return the promoted data type of a given data type. More...
|
|
std::tuple< PixelValue, PixelValue > | get_min_max (DataType dt) |
| Compute the mininum and maximum values a data type can take. More...
|
|
bool | has_format_horizontal_subsampling (Format format) |
| Return true if the given format has horizontal subsampling. More...
|
|
bool | has_format_vertical_subsampling (Format format) |
| Return true if the given format has vertical subsampling. More...
|
|
TensorShape | adjust_odd_shape (const TensorShape &shape, Format format) |
| Adjust tensor shape size if width or height are odd for a given multi-planar format. More...
|
|
TensorShape | calculate_subsampled_shape (const TensorShape &shape, Format format, Channel channel=Channel::UNKNOWN) |
| Calculate subsampled shape for a given format and channel. More...
|
|
template<typename T > |
void | permute_strides (Dimensions< T > &dimensions, const PermutationVector &perm) |
| Permutes the given dimensions according the permutation vector. More...
|
|
PadStrideInfo | calculate_same_pad (TensorShape input_shape, TensorShape weights_shape, PadStrideInfo conv_info, DataLayout data_layout=DataLayout::NCHW, const Size2D &dilation=Size2D(1u, 1u), const DimensionRoundingType &rounding_type=DimensionRoundingType::FLOOR) |
| Calculate padding requirements in case of SAME padding. More...
|
|
std::pair< unsigned int, unsigned int > | deconvolution_output_dimensions (unsigned int in_width, unsigned int in_height, unsigned int kernel_width, unsigned int kernel_height, const PadStrideInfo &pad_stride_info) |
| Returns expected width and height of the deconvolution's output tensor. More...
|
|
std::pair< unsigned int, unsigned int > | scaled_dimensions (int width, int height, int kernel_width, int kernel_height, const PadStrideInfo &pad_stride_info, const Size2D &dilation=Size2D(1U, 1U)) |
| Returns expected width and height of output scaled tensor depending on dimensions rounding mode. More...
|
|
std::pair< int, int > | scaled_dimensions_signed (int width, int height, int kernel_width, int kernel_height, const PadStrideInfo &pad_stride_info) |
| Returns calculated width and height of output scaled tensor depending on dimensions rounding mode. More...
|
|
bool | needs_serialized_reduction (ReductionOperation op, DataType dt, unsigned int axis) |
| Check if the given reduction operation should be handled in a serial way. More...
|
|
QuantizationInfo | get_softmax_output_quantization_info (DataType input_type, bool is_log) |
| Returns output quantization information for softmax layer. More...
|
|
std::pair< int32_t, int32_t > | get_quantized_activation_min_max (ActivationLayerInfo act_info, DataType data_type, UniformQuantizationInfo oq_info) |
| Returns a pair of minimum and maximum values for a quantized activation. More...
|
|
const std::string & | string_from_format (Format format) |
| Convert a tensor format into a string. More...
|
|
const std::string & | string_from_channel (Channel channel) |
| Convert a channel identity into a string. More...
|
|
const std::string & | string_from_data_layout (DataLayout dl) |
| Convert a data layout identity into a string. More...
|
|
const std::string & | string_from_data_type (DataType dt) |
| Convert a data type identity into a string. More...
|
|
const std::string & | string_from_activation_func (ActivationLayerInfo::ActivationFunction act) |
| Translates a given activation function to a string. More...
|
|
const std::string & | string_from_interpolation_policy (InterpolationPolicy policy) |
| Translates a given interpolation policy to a string. More...
|
|
const std::string & | string_from_border_mode (BorderMode border_mode) |
| Translates a given border mode policy to a string. More...
|
|
const std::string & | string_from_norm_type (NormType type) |
| Translates a given normalization type to a string. More...
|
|
const std::string & | string_from_pooling_type (PoolingType type) |
| Translates a given pooling type to a string. More...
|
|
const std::string & | string_from_gemmlowp_output_stage (GEMMLowpOutputStageType output_stage) |
| Translates a given GEMMLowp output stage to a string. More...
|
|
std::string | string_from_pixel_value (const PixelValue &value, const DataType data_type) |
| Convert a PixelValue to a string, represented through the specific data type. More...
|
|
DataType | data_type_from_name (const std::string &name) |
| Convert a string to DataType. More...
|
|
std::unordered_map< const ITensorInfo *, PaddingSize > | get_padding_info (std::initializer_list< const ITensorInfo *> infos) |
| Stores padding information before configuring a kernel. More...
|
|
std::unordered_map< const ITensorInfo *, PaddingSize > | get_padding_info (std::initializer_list< const ITensor *> tensors) |
| Stores padding information before configuring a kernel. More...
|
|
bool | has_padding_changed (const std::unordered_map< const ITensorInfo *, PaddingSize > &padding_map) |
| Check if the previously stored padding info has changed after configuring a kernel. More...
|
|
inline ::std::istream & | operator>> (::std::istream &stream, DataType &data_type) |
| Input Stream operator for DataType. More...
|
|
std::string | lower_string (const std::string &val) |
| Lower a given string. More...
|
|
bool | is_data_type_float (DataType dt) |
| Check if a given data type is of floating point type. More...
|
|
bool | is_data_type_quantized (DataType dt) |
| Check if a given data type is of quantized type. More...
|
|
bool | is_data_type_quantized_asymmetric (DataType dt) |
| Check if a given data type is of asymmetric quantized type. More...
|
|
bool | is_data_type_quantized_asymmetric_signed (DataType dt) |
| Check if a given data type is of asymmetric quantized signed type. More...
|
|
bool | is_data_type_quantized_symmetric (DataType dt) |
| Check if a given data type is of symmetric quantized type. More...
|
|
bool | is_data_type_quantized_per_channel (DataType dt) |
| Check if a given data type is of per channel type. More...
|
|
std::string | float_to_string_with_full_precision (float val) |
| Create a string with the float in full precision. More...
|
|
size_t | num_of_elements_in_range (const float start, const float end, const float step) |
| Returns the number of elements required to go from start to end with the wanted step. More...
|
|
template<typename T > |
bool | check_value_range (T val, DataType dt, QuantizationInfo qinfo=QuantizationInfo()) |
| Returns true if the value can be represented by the given data type. More...
|
|
unsigned int | adjust_vec_size (unsigned int vec_size, size_t dim0) |
| Returns the adjusted vector size in case it is less than the input's first dimension, getting rounded down to its closest valid vector size. More...
|
|