#
Computing Minimum/Maximum Values

#include "mkl_vsl.h" #define DIM 3 /* dimension of the task */ #define N 1000 /* number of observations */ int main() { VSLSSTaskPtr task; float x[DIM][N]; /* matrix of observations */ float min_est[DIM], max_est[DIM]; MKL_INT p, n, xstorage; int status; /* Parameters of the task and initialization */ p = DIM; n = N; xstorage = VSL_SS_MATRIX_STORAGE_ROWS; for ( int i = 0; i < p; i++ ) min_est[i] = max_est[i] = x[i][0]; /* Create a task */ status = vslsSSNewTask( &task, &p, &n, &xstorage, (float*)x, 0, 0 ); /* Initialize the task parameters */ status = vslsSSEditTask( task, VSL_SS_ED_MIN, min_est ); status = vslsSSEditTask( task, VSL_SS_ED_MAX, max_est ); /* Compute the minimum and maximum values in observations */ status = vslsSSCompute( task, VSL_SS_MIN|VSL_SS_MAX, VSL_SS_METHOD_FAST ); /* Deallocate the task resources */ status = vslSSDeleteTask( &task ); return 0; }

`values of each estimate, wherep`

`is the dimension of the task.p`