MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / float_converter

Function float_converter

tests/validation/reference/ROIAlignLayer.cpp:111–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110template <typename TI, typename TO>
111SimpleTensor<TO> float_converter(const SimpleTensor<TI> &tensor, DataType dst_dt)
112{
113 SimpleTensor<TO> dst{tensor.shape(), dst_dt, 1, QuantizationInfo(), tensor.data_layout()};
114#if defined(_OPENMP)
115#pragma omp parallel for
116#endif /* _OPENMP */
117 for (int i = 0; i < tensor.num_elements(); ++i)
118 {
119 dst[i] = tensor[i];
120 }
121 return dst;
122}
123
124SimpleTensor<float> convert_rois_from_asymmetric(SimpleTensor<uint16_t> rois)
125{

Callers

nothing calls this directly

Calls 4

QuantizationInfoClass · 0.50
shapeMethod · 0.45
data_layoutMethod · 0.45
num_elementsMethod · 0.45

Tested by

no test coverage detected