# ErrorClass

Checks if the status reflects an error of a predefined class.

## Syntax

Fortran:

Predicate = DftiErrorClass( Status, Error_Class )

C:

predicate = DftiErrorClass( status, error_class );

## Description

The FFT interface in Intel MKL provides a set of predefined error class listed in Table “Predefined Error Class”. These are named constants and have the type INTEGER in Fortran and long in C.

Predefined Error Class
Named Constants | Comments
--- | ---
`DFTI_NO_ERROR` | No error
`DFTI_MEMORY_ERROR` | Usually associated with memory allocation
`DFTI_INVALID_CONFIGURATION` | Invalid settings of one or more configuration parameters
`DFTI_INCONSISTENT_CONFIGURATION` | Inconsistent configuration or input parameters
`DFTI_NUMBER_OF_THREADS_ERROR` | Number of OMP threads in the computation function is not equal to the number of OMP threads in the initialization stage (commit function)
`DFTI_MULTITHREADED_ERROR` | Usually associated with a value that OMP routines return in case of errors
`DFTI_BAD_DESCRIPTOR` | Descriptor is unusable for computation
`DFTI_UNIMPLEMENTED` | Unimplemented legitimate settings; implementation dependent
`DFTI_MKL_INTERNAL_ERROR` | Internal library error
`DFTI_1D_LENGTH_EXCEEDS_INT32` | Length of one of dimensions exceeds 232 -1 (4 bytes).

Note that the correct usage is to check if the status returns .TRUE. or .FALSE. through the use of DftiErrorClass with a specific error class. Direct comparison of a status with the predefined class is an incorrect usage. see Example “Using Status Checking Function” on a correct use of the status checking functions.

## Interface and Prototype

//Fortran interface

INTERFACE DftiErrorClass

//Note that the body provided here is to illustrate the different

//argument list and types of dummy arguments. The interface

//does not guarantee what the actual function names are.

//Users can only rely on the function name following the

//keyword INTERFACE

FUNCTION some_actual_function_8( Status, Error_Class )

LOGICAL some_actual_function_8

INTEGER, INTENT(IN) :: Status, Error_Class

END FUNCTION some_actual_function_8

END INTERFACE DftiErrorClass

/* C prototype */

long DftiErrorClass( long , long );

Parent topic: Status Checking Functions