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

Function find_min_max

examples/neon_gemm_qasymm8.cpp:39–48  ·  view source on GitHub ↗

Find min and max value in a float array

Source from the content-addressed store, hash-verified

37
38// Find min and max value in a float array
39void find_min_max(int size, const float *data, float *min, float *max)
40{
41 *min = *max = data[0];
42 for (int i = 0; i < size; i++)
43 {
44 const float val = data[i];
45 *min = std::min(*min, val);
46 *max = std::max(*max, val);
47 }
48}
49
50// Return reasonable quantisation parameters to use for an array of floats
51// based on min and max values

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected