|
template<typename T , typename = typename std::enable_if<std::is_floating_point<T>::value>::type> |
T | round_half_up (T value) |
| Round floating-point value with half value rounding to positive infinity. More...
|
|
template<typename T , typename = typename std::enable_if<std::is_floating_point<T>::value>::type> |
T | round_half_even (T value, T epsilon=std::numeric_limits< T >::epsilon()) |
| Round floating-point value with half value rounding to nearest even. More...
|
|
Format | get_format_for_channel (Channel channel) |
| Look up the format corresponding to a channel. More...
|
|
Format | get_channel_format (Channel channel) |
| Return the format of a channel. More...
|
|
template<typename F , typename T > |
T | foldl (F &&, const T &value) |
| Base case of foldl. More...
|
|
template<typename F , typename T , typename U > |
auto | foldl (F &&func, T &&value1, U &&value2) -> decltype(func(value1, value2)) |
| Base case of foldl. More...
|
|
template<typename F , typename I , typename T , typename... Vs> |
I | foldl (F &&func, I &&initial, T &&value, Vs &&... values) |
| Fold left. More...
|
|
ValidRegion | shape_to_valid_region (const TensorShape &a_shape, bool border_undefined=false, BorderSize border_size=BorderSize(0)) |
| Create a valid region based on tensor shape, border mode and border size. More...
|
|
template<typename T > |
void | store_value_with_data_type (void *ptr, T value, DataType data_type) |
| Write the value after casting the pointer according to data_type . More...
|
|
template<typename U , typename T > |
T | saturate_cast (T val) |
| Saturate a value of type T against the numeric limits of type U. More...
|
|
Coordinates | index2coord (const TensorShape &shape, int index) |
| Convert a linear index into n-dimensional coordinates. More...
|
|
int | coord2index (const TensorShape &shape, const Coordinates &coord) |
| Linearise the given coordinate. More...
|
|
bool | is_in_valid_region (const ValidRegion &valid_region, Coordinates coord) |
| Check if a coordinate is within a valid region. More...
|
|
template<typename T > |
T | create_tensor (const TensorInfo &info, IRuntimeContext *ctx=nullptr) |
| Create and initialize a tensor of the given type. More...
|
|
template<typename T > |
T | create_tensor (const TensorShape &shape, DataType data_type, int num_channels=1, QuantizationInfo quantization_info=QuantizationInfo(), DataLayout data_layout=DataLayout::NCHW, IRuntimeContext *ctx=nullptr) |
| Create and initialize a tensor of the given type. More...
|
|
template<typename T > |
T | create_tensor (const TensorShape &shape, Format format, IRuntimeContext *ctx=nullptr) |
| Create and initialize a tensor of the given type. More...
|
|
template<typename T , typename = typename std::enable_if<std::is_floating_point<T>::value>::type> |
std::vector< T > | generate_random_real (unsigned int num_values, T min, T max, std::random_device::result_type seed) |
| Create a vector with a uniform distribution of floating point values across the specified range. More...
|
|
template<typename T , typename ArrayAccessor_T > |
void | fill_array (ArrayAccessor_T &&array, const std::vector< T > &v) |
|
std::string | get_typestring (DataType data_type) |
| Obtain numpy type string from DataType. More...
|
|
template<typename TensorType > |
void | sync_if_necessary () |
| Sync if necessary. More...
|
|
template<typename TensorType > |
void | sync_tensor_if_necessary (TensorType &tensor) |
| Sync tensor if necessary. More...
|
|
ITensorInfo::TensorDimsState | construct_dims_state (int32_t value) |
| Construct and return object for dimensions' state filled with the given value. More...
|
|
ITensorInfo::TensorDimsState | construct_dynamic_dims_state () |
| Construct and return object for dimensions' state filled with the value for dynamic state. More...
|
|
ITensorInfo::TensorDimsState | construct_static_dims_state () |
| Construct and return object for dimensions' state filled with the value for non-dynamic state. More...
|
|
template<typename TensorType > |
void | set_tensor_dynamic (TensorType &t) |
| Set the dimension states of the given tensor to dynamic. More...
|
|
template<typename TensorType > |
void | set_tensor_static (TensorType &t) |
| Set the dimension states of the given tensor to state. More...
|
|
experimental::dynamic_fusion::Conv2dAttributes | convert_pad_stride_info_to_conv_attr (const PadStrideInfo &info, const Size2D &dialation) |
|