Overview
Computes the standard deviation of the input buffer using the supplied mean.
Dispatcher Prototype
Inputs
- inputBuffer: The input vector of floats.
- mean: The mean of the input buffer.
- num_points: The number of data points.
Outputs
- stddev: The output vector.
Example Calculate the standard deviation from numbers generated with c++11's normal generator
int N = 1000;
float* increasing = (
float*)
volk_malloc(
sizeof(
float)*N, alignment);
float mean = 0.0f;
float* stddev = (
float*)
volk_malloc(
sizeof(
float), alignment);
std::default_random_engine generator;
std::normal_distribution<float> distribution(mean,1);
for(unsigned int ii = 0; ii < N; ++ii){
increasing[ii] = distribution(generator);
}
printf("std. dev. = %f\n", *stddev);