# ?_init_trig_transform

Initializes basic data structures of a Trigonometric Transform.

## Syntax

void d_init_trig_transform (int *n, int *tt_type, int ipar[], double dpar[], int *stat);

void s_init_trig_transform (int *n, int *tt_type, int ipar[], float spar[], int *stat);

## Input Parameters

n | int*. Contains the size of the problem, which should be a positive integer greater than 1. Note that data vector of the transform, which other TT routines will use, must have size n+1 for all but staggered2 transforms. Staggered2 transforms require the vector of size n.
tt_type | int*. Contains the type of transform to compute, defined via a set of named constants. The following constants are available in the current implementation of TT interface: `MKL_SINE_TRANSFORM, MKL_STAGGERED_SINE_TRANSFORM`, `MKL_STAGGERED2_SINE_TRANSFORM`; `MKL_COSINE_TRANSFORM, MKL_STAGGERED_COSINE_TRANSFORM`, `MKL_STAGGERED2_COSINE_TRANSFORM`.

## Output Parameters

ipar | int array of size 128. Contains integer data needed for Trigonometric Transform computations.
dpar | double array of size 5n/2+2. Contains double-precision data needed for Trigonometric Transform computations.
spar | float array of size 5n/2+2. Contains single-precision data needed for Trigonometric Transform computations.
stat | int*. Contains the routine completion status, which is also written to ipar[6]. The status should be 0 to proceed to other TT routines.

## Description

The routine initializes basic data structures for Trigonometric Transforms of appropriate precision. After a call to ?_init_trig_transform, all subsequently invoked TT routines use values of ipar and dpar (spar) array parameters returned by ?_init_trig_transform. The routine initializes the entire array ipar. In the dpar or spar array, ?_init_trig_transform initializes elements that do not depend upon the type of transform. For a detailed description of arrays ipar, dpar and spar, refer to Common Parameters. You can skip calling the initialization routine in your code. For more information, see Caveat on Parameter Modifications.

## Return Values

stat= 0 | The routine successfully completed the task. In general, to proceed with computations, the routine should complete with this stat value.
stat= -99999 | The routine failed to complete the task.

Parent topic: TT Routines