# NewTask1D

Creates a new convolution or correlation task descriptor for one-dimensional case.

## Syntax

Fortran:

status = vslsconvnewtask1d(task, mode, xshape, yshape, zshape)

status = vsldconvnewtask1d(task, mode, xshape, yshape, zshape)

status = vslscorrnewtask1d(task, mode, xshape, yshape, zshape)

status = vsldcorrnewtask1d(task, mode, xshape, yshape, zshape)

C:

status = vslsConvNewTask1D(task, mode, xshape, yshape, zshape);

status = vsldConvNewTask1D(task, mode, xshape, yshape, zshape);

status = vslsCorrNewTask1D(task, mode, xshape, yshape, zshape);

status = vsldCorrNewTask1D(task, mode, xshape, yshape, zshape);

## Description

Each NewTask1D constructor creates a new convolution or correlation task descriptor with the user specified values for explicit parameters. The optional parameters are set to their default values (see Table“Convolution and Correlation Task Parameters”). Unlike NewTask, these routines represent a special one-dimensional version of the constructor which assumes that the value of the parameter dims is 1. The parameters xshape, yshape, and zshape are equal to the number of elements read from the arrays x and y or stored to the array z. You explicitly assign the shape parameters when calling the constructor.

## Input Parameters

Name | Type | Description
--- | --- | ---
mode | FORTRAN: INTEGER C: int | Specifies whether convolution/correlation calculation must be performed by using a direct algorithm or through Fourier transform of the input data. See Table“Values of mode parameter” for a list of possible values.
xshape | FORTRAN: INTEGER C: int | Defines the length of the input data sequence for the source array x. See Data Allocation for more information.
yshape | FORTRAN: INTEGER C: int | Defines the length of the input data sequence for the source array y. See Data Allocation for more information.
zshape | FORTRAN: INTEGER C: int | Defines the length of the output data sequence to be stored in array z. See Data Allocation for more information.

## Output Parameters

Name | Type | Description
--- | --- | ---
task | FORTRAN: TYPE(VSL_CONV_TASK) for vslsconvnewtask1d, vsldconvnewtask1d TYPE(VSL_CORR_TASK) for vslscorrnewtask1d, vsldcorrnewtask1d C: VSLConvTaskPtr* for vslsConvNewTask1D, vsldConvNewTask1D VSLCorrTaskPtr* for vslsCorrNewTask1D, vsldCorrNewTask1D | Pointer to the task descriptor if created successfully or NULL pointer otherwise.
status | FORTRAN: INTEGER C: int | Set to VSL_STATUS_OK if the task is created successfully or set to non-zero error code otherwise.

Parent topic: Task Constructors