# The "t" Package

These routines are meant to provide a low level mechanism to perform mathematical transformations on data. For example, low level Fast Fourier Transforms are supplied in this package.

Library: karma
Link With: -lkarma

#### Functions

t_c_to_c_1D_fft_float | Compute a 1D complex to complex single precision FFT.
t_c_to_c_many_1D_fft_float | Compute many 1D complex to complex single precision FFTs.
t_check_power_of_2 | Check if a number is a power of 2.
t_r_to_c_many_1D_fft_float | Compute many 1D real to complex single precision FFTs.

#### Tables

t_FFT_STATUS | List of FFT status values

## Functions

unsigned int t_c_to_c_1D_fft_float (float *real, float *imag, unsigned int length, unsigned int stride, int direction)

This routine will perform a complex to complex 1 dimensional FFT on an array of single precision complex data. The routine performs the transform in situ.

Parameters:

- real : The array of real components. This is modified.
- imag : The array of imaginary components. This is modified.
- length : The number of complex values in the array to transform.
- stride : The stride (in bytes) of successive components.
- direction : If the value is KARMA_FFT_FORWARD, the forward transform is performed. If the value is KARMA_FFT_INVERSE, the inverse transform is performed.

Returns: A value indicating the success / failure status of the transform. See t_FFT_STATUS for a list of possible values.
Multithreading Level: Unsafe

unsigned int t_c_to_c_many_1D_fft_float (float *real, float *imag, unsigned int length, unsigned int elem_stride, unsigned int number, unsigned int dim_stride, int direction)

This routine will perform a number of complex to complex 1 dimensional FFTs on an array of single precision complex data. The routine performs the transforms in situ.

Parameters:

- real : The array of real components.
- imag : The array of imaginary components.
- length : The number of complex values in the array to transform.
- elem_stride : The stride (in bytes) of successive components.
- number : The number of 1 dimensional FFTs to perform.
- dim_stride : The stride (in bytes) between successive data sets.
- direction : If the value is KARMA_FFT_FORWARD, the forward transform is performed. If the value is KARMA_FFT_INVERSE, the inverse transform is performed.

Returns: A value indicating the success / failure status of the transform. See t_FFT_STATUS for a list of possible values.
Multithreading Level: Unsafe

flag t_check_power_of_2 (unsigned int number)

Check if a number is a power of 2.

Parameters:

- number : The number.

Returns: TRUE if the number is a power of 2, else FALSE.
Multithreading Level: Unsafe

unsigned int t_r_to_c_many_1D_fft_float (float *a, unsigned int length, unsigned int elem_stride, unsigned int number, unsigned int dim_stride, int direction)

This routine will perform a real to complex or complex to real FFT.

Parameters:

- a : The array.
- n : The number of elements to transform.
- elem_stride : The stride (in floats) of sucessive data elements.
- number : The number of transforms to perform.
- dim_stride : The stride (in floats) between sucessive data sets.
- direction : If the value is KARMA_FFT_FORWARD, the forward, real to complex transform is performed. If the value is KARMA_FFT_INVERSE, the inverse, complex to real transform is performed.

Returns: A value indicating the success / failure status of the transform. See t_FFT_STATUS for a list of possible values.
Multithreading Level: Unsafe

## Tables

t_FFT_STATUS List of FFT status values

Name | Meaning
KARMA_FFT_OK | Transform successful
KARMA_FFT_BAD_LENGTH | Bad length supplied
KARMA_FFT_BAD_TYPE | Bad data type
KARMA_FFT_ALLOC_ERROR | Internal allocation error
KARMA_FFT_METHOD_NOT_AVAILABLE | Method not available
KARMA_FFT_BAD_STRIDE | Bad stride

Back to Karma Home Page