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

Function find_min_max

examples/neon_gemm_qasymm8_signed.cpp:40–49  ·  view source on GitHub ↗

Find min and max value in a float array

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected