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

Function scale

tests/validation/reference/DFT.cpp:240–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238 */
239template <typename T>
240void scale(SimpleTensor<T> &tensor, T scaling_factor)
241{
242 const int total_elements = tensor.num_elements() * tensor.num_channels();
243 T *data_ptr = tensor.data();
244#if defined(_OPENMP)
245#pragma omp parallel for
246#endif /* _OPENMP */
247 for (int i = 0; i < total_elements; ++i)
248 {
249 data_ptr[i] /= scaling_factor;
250 }
251}
252
253/** Performs a complex element-wise multiplication with reduction across the channels axis.
254 *

Callers 4

ridft_1dFunction · 0.70
dft_1dFunction · 0.70
ridft_2dFunction · 0.70
dft_2dFunction · 0.70

Calls 3

num_elementsMethod · 0.45
num_channelsMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected