Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

vslSSNewTask

Creates and initializes a new summary statistics task descriptor.

Syntax

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

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

Include Files

  • mkl_vsl.f90

Input Parameters

Name

Type

Description

p

Fortran: INTEGER

Dimension of the task, number of variables

n

Fortran: INTEGER

Number of observations

xstorage

Fortran: INTEGER

Storage format of matrix of observations

x

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

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

Matrix of observations

w

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

REAL(KIND=8) DIMENSION(*) 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(*)

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)

Descriptor of the task

status

Fortran: INTEGER

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".

Storage format of matrix of observations, order statistics, and matrix of sorted observations

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.

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.

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.