Function Descriptions
3.26 Median of a real array of floats
Description:
This module computes the median of a real array of floats. The Input array is NOT preserved.
If input array preservation is required, use median_noreorder_SP_RV().
Header File:
FPU.h
Declaration:
float32 median_SP_RV(float32
*
, Uint16)
Usage:
z = median_SP_RV(x, N);
float32 *x
input array
Uint16 N
length of x array
float32 y
result
Alignment Requirements:
None
Notes:
1. This function is destructive to the input array x in that it will be sorted during func-
tion execution. If this is not allowable, use median_noreorder_SP_CV().
2. This function should be compiled with -o4, -mf5, and no -g compiler options for
best performance.
Example:
#include "FPU.h"
#define N 256
float32 x[N];
float32 y;
main()
{
y = median_SP_RV(x, N);
}
Benchmark Information:
The cycles for this function are data dependent and therefore the benchmark cannot be pro-
vided.
Sep 10, 2012 60