# Task Constructors

Task constructors are routines intended for creating a new task descriptor and setting up basic parameters. This means that no additional parameter adjustment is typically required and other routines can use the task object.

Intel® MKL implementation of the convolution and correlation API provides two different forms of constructors: a general form and an X-form. X-form constructors work in the same way as the general form but also assign particular data to the first operand vector used in convolution or correlation operation (stored in array x).

Using X-form constructors is recommended when you need to compute multiple convolutions or correlations with the same data vector held in array x against different vectors held in array y. This helps improve performance by eliminating unnecessary overhead in repeated computation of intermediate data required for the operation.

For each constructor routine there is also an associated one-dimensional version which exploits the algorithmic and computational benefits provided by the simplicity of the data structures for one-dimensional case.

### Note

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

The Table“Task Constructors” lists available task constructors:

Task Constructors
Routine | Description
--- | ---
NewTask | Creates a new convolution or correlation task descriptor for a multidimensional case.
NewTask1D | Creates a new convolution or correlation task descriptor for a one-dimensional case.
NewTaskX | Creates a new convolution or correlation task descriptor as an X-form for a multidimensional case.
NewTaskX1D | Creates a new convolution or correlation task descriptor as an X-form for a one-dimensional case.