vslSSNewTask

Creates and initializes a new summary statistics task descriptor.

Syntax

Fortran:

status = vslsssnewtask(task, p, n, xstorage, x, w, indices)

status = vsldssnewtask(task, p, n, xstorage, x, w, indices)

C:

status = vslsSSNewTask(&task, p, n, xstorage, x, w, indices);

status = vsldSSNewTask(&task, p, n, xstorage, x, w, indices);

Include Files

  • Fortran 90: mkl_vsl.f90
  • C: mkl.h

Input Parameters

Name

Type

Description

p

Fortran: INTEGER

C: const MKL_INT

Dimension of the task, number of variables

n

Fortran: INTEGER

C: const MKL_INT

Number of observations

xstorage

Fortran: INTEGER

C: const MKL_INT

Storage format of matrix of observations

x

Fortran: REAL(KIND=4) DIMENSION(*) for vslsssnewtask

REAL(KIND=8) DIMENSION(*) for vsldssnewtask

C: const float* for vslsSSNewTask

const double* for vsldSSNewTask

Matrix of observations

w

Fortran: REAL(KIND=4) DIMENSION(*) for vslsssnewtask

REAL(KIND=8) DIMENSION(*) for vsldssnewtask

C: const float* for vslsSSNewTask

const double* for vsldSSNewTask

Array of weights of size n. Elements of the arrays are non-negative numbers. If a NULL pointer is passed, each observation is assigned weight equal to 1.

indices

Fortran: INTEGER, DIMENSION(*)

C: const MKL_INT*

Array of vector components that will be processed. Size of array is p. If a NULL pointer is passed, all components of random vector are processed.

Output Parameters

Name

Type

Description

task

Fortran: TYPE(VSL_SS_TASK)

C: VSLSSTaskPtr*

Descriptor of the task

status

Fortran: INTEGER

C: int

Set to VSL_STATUS_OK if the task is created successfully, otherwise a non-zero error code is returned.

Description

Each vslSSNewTask constructor routine creates a new summary statistics task descriptor with the user-specified value for a required parameter, dimension of the task. The optional parameters (matrix of observations, its storage format, number of observations, weights of observations, and indices of the random vector components) are set to their default values.

The observations of random p-dimensional vector ξ = (ξ1, ..., ξi, ..., ξp), which are n vectors of dimension p, are passed as a one-dimensional array x. The parameter xstorage defines the storage format of the observations and takes one of the possible values listed in Table "Storage format of matrix of observations and order statistics".

Note

Since matrices in Fortran are stored by columns while in C they are stored by rows, initialization of the xstorage variable in Fortran is opposite to that in C. Set xstorage to VSL_SS_MATRIX_STORAGE_COLS, if the dataset is stored as a two-dimensional matrix that consists of p rows and n columns; otherwise, use the VSL_SS_MATRIX_STORAGE_ROWS constant.

Storage format of matrix of observations and order statistics

Parameter

Description

VSL_SS_MATRIX_STORAGE_ROWS

The observations of random vector ξ are packed by rows: n data points for the vector component ξ1 come first, n data points for the vector component ξ2 come second, and so forth.

VSL_SS_MATRIX_STORAGE_COLS

The observations of random vector ξ are packed by columns: the first p-dimensional observation of the vector ξ comes first, the second p-dimensional observation of the vector comes second, and so forth.

A one-dimensional array w of size n contains non-negative weights assigned to the observations. You can pass a NULL array into the constructor. In this case, each observation is assigned the default value of the weight.

You can choose vector components for which you wish to compute statistical estimates. If an element of the vector indices of size p contains 0, the observations that correspond to this component are excluded from the calculations. If you pass the NULL value of the parameter into the constructor, statistical estimates for all random variables are computed.

If the constructor fails to create a task descriptor, it returns the NULL task pointer.

For more complete information about compiler optimizations, see our Optimization Notice.