OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Classes | Macros | Functions | Variables
fftpack.cpp File Reference
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "fftpack.h"
#include "FFT/fftpack_inc.c"
Include dependency graph for fftpack.cpp:

Go to the source code of this file.

Classes

struct  cmplx
 

Macros

#define RALLOC(type, num)    ((type *)util_malloc_((num)*sizeof(type)))
 
#define DEALLOC(ptr)    { if ((ptr) != 0) free (ptr); (ptr) = NULL; }
 
#define SWAP(a, b, type)    do { type tmp_=(a); (a)=(b); (b)=tmp_; } while(0)
 
#define WA(x, i)   wa[(i)+(x)*ido]
 
#define CH(a, b, c)   ch[(a)+ido*((b)+l1*(c))]
 
#define CC(a, b, c)   cc[(a)+ido*((b)+cdim*(c))]
 
#define PM(a, b, c, d)   { a=c+d; b=c-d; }
 
#define PMC(a, b, c, d)   { a.r=c.r+d.r; a.i=c.i+d.i; b.r=c.r-d.r; b.i=c.i-d.i; }
 
#define ADDC(a, b, c)   { a.r=b.r+c.r; a.i=b.i+c.i; }
 
#define SCALEC(a, b)   { a.r*=b; a.i*=b; }
 
#define CONJFLIPC(a)   { double tmp_=a.r; a.r=-a.i; a.i=tmp_; }
 
#define MULPM(a, b, c, d, e, f)   { a=c*e+d*f; b=c*f-d*e; }
 
#define CONCAT(a, b)   a ## b
 
#define X(arg)   CONCAT(passb,arg)
 
#define BACKWARD
 
#define X(arg)   CONCAT(passf,arg)
 
#define CC(a, b, c)   cc[(a)+ido*((b)+l1*(c))]
 
#define CH(a, b, c)   ch[(a)+ido*((b)+cdim*(c))]
 
#define CH(a, b, c)   ch[(a)+ido*((b)+l1*(c))]
 
#define CC(a, b, c)   cc[(a)+ido*((b)+cdim*(c))]
 
#define C1(a, b, c)   cc[(a)+ido*((b)+l1*(c))]
 
#define C2(a, b)   cc[(a)+idl1*(b)]
 
#define CH2(a, b)   ch[(a)+idl1*(b)]
 
#define CH(a, b, c)   ch[(a)+ido*((b)+l1*(c))]
 
#define CC(a, b, c)   cc[(a)+ido*((b)+cdim*(c))]
 

Functions

void * util_malloc_ (size_t sz)
 
void util_free_ (void *ptr)
 
void cfftf (size_t n, double c[], double wsave[])
 
void cfftb (size_t n, double c[], double wsave[])
 
void cffti (size_t n, double wsave[])
 
void rfftf (size_t n, double r[], double wsave[])
 
void rfftb (size_t n, double r[], double wsave[])
 
void rffti (size_t n, double wsave[])
 
void sinti (size_t n, double wsave[])
 
void sint1 (size_t n, double war[], double was[], double xh[], double x[], double xxifac[])
 
void sint (size_t n, double x[], double wsave[])
 

Variables

const double pi = 3.14159265358979
 

Macro Definition Documentation

◆ ADDC

#define ADDC (   a,
  b,
 
)    { a.r=b.r+c.r; a.i=b.i+c.i; }

Definition at line 98 of file fftpack.cpp.

◆ BACKWARD

#define BACKWARD

Definition at line 107 of file fftpack.cpp.

◆ C1

#define C1 (   a,
  b,
 
)    cc[(a)+ido*((b)+l1*(c))]

Definition at line 275 of file fftpack.cpp.

◆ C2

#define C2 (   a,
 
)    cc[(a)+idl1*(b)]

Definition at line 276 of file fftpack.cpp.

◆ CC [1/4]

#define CC (   a,
  b,
 
)    cc[(a)+ido*((b)+cdim*(c))]

Definition at line 389 of file fftpack.cpp.

◆ CC [2/4]

#define CC (   a,
  b,
 
)    cc[(a)+ido*((b)+l1*(c))]

Definition at line 389 of file fftpack.cpp.

◆ CC [3/4]

#define CC (   a,
  b,
 
)    cc[(a)+ido*((b)+cdim*(c))]

Definition at line 389 of file fftpack.cpp.

◆ CC [4/4]

#define CC (   a,
  b,
 
)    cc[(a)+ido*((b)+cdim*(c))]

Definition at line 389 of file fftpack.cpp.

◆ CH [1/4]

#define CH (   a,
  b,
 
)    ch[(a)+ido*((b)+l1*(c))]

Definition at line 388 of file fftpack.cpp.

◆ CH [2/4]

#define CH (   a,
  b,
 
)    ch[(a)+ido*((b)+cdim*(c))]

Definition at line 388 of file fftpack.cpp.

◆ CH [3/4]

#define CH (   a,
  b,
 
)    ch[(a)+ido*((b)+l1*(c))]

Definition at line 388 of file fftpack.cpp.

◆ CH [4/4]

#define CH (   a,
  b,
 
)    ch[(a)+ido*((b)+l1*(c))]

Definition at line 388 of file fftpack.cpp.

◆ CH2

#define CH2 (   a,
 
)    ch[(a)+idl1*(b)]

Definition at line 277 of file fftpack.cpp.

◆ CONCAT

#define CONCAT (   a,
 
)    a ## b

Definition at line 104 of file fftpack.cpp.

◆ CONJFLIPC

#define CONJFLIPC (   a)    { double tmp_=a.r; a.r=-a.i; a.i=tmp_; }

Definition at line 100 of file fftpack.cpp.

◆ DEALLOC

#define DEALLOC (   ptr)     { if ((ptr) != 0) free (ptr); (ptr) = NULL; }

Definition at line 74 of file fftpack.cpp.

◆ MULPM

#define MULPM (   a,
  b,
  c,
  d,
  e,
 
)    { a=c*e+d*f; b=c*f-d*e; }

Definition at line 102 of file fftpack.cpp.

◆ PM

#define PM (   a,
  b,
  c,
 
)    { a=c+d; b=c-d; }

Definition at line 96 of file fftpack.cpp.

◆ PMC

#define PMC (   a,
  b,
  c,
 
)    { a.r=c.r+d.r; a.i=c.i+d.i; b.r=c.r-d.r; b.i=c.i-d.i; }

Definition at line 97 of file fftpack.cpp.

◆ RALLOC

#define RALLOC (   type,
  num 
)     ((type *)util_malloc_((num)*sizeof(type)))

Definition at line 71 of file fftpack.cpp.

◆ SCALEC

#define SCALEC (   a,
 
)    { a.r*=b; a.i*=b; }

Definition at line 99 of file fftpack.cpp.

◆ SWAP

#define SWAP (   a,
  b,
  type 
)     do { type tmp_=(a); (a)=(b); (b)=tmp_; } while(0)

Definition at line 83 of file fftpack.cpp.

◆ WA

#define WA (   x,
 
)    wa[(i)+(x)*ido]

Definition at line 93 of file fftpack.cpp.

◆ X [1/2]

#define X (   arg)    CONCAT(passb,arg)

Definition at line 112 of file fftpack.cpp.

◆ X [2/2]

#define X (   arg)    CONCAT(passf,arg)

Definition at line 112 of file fftpack.cpp.

Function Documentation

◆ cfftb()

void cfftb ( size_t  N,
double  complex_data[],
double  wrk[] 
)

backward complex transform

Definition at line 705 of file fftpack.cpp.

References Hypervolume::n.

◆ cfftf()

void cfftf ( size_t  N,
double  complex_data[],
double  wrk[] 
)

forward complex transform

Definition at line 698 of file fftpack.cpp.

References Hypervolume::n.

◆ cffti()

void cffti ( size_t  N,
double  wrk[] 
)

initializer for complex transforms

Definition at line 776 of file fftpack.cpp.

References Hypervolume::n.

◆ rfftb()

void rfftb ( size_t  N,
double  data[],
double  wrk[] 
)

backward real transform

Definition at line 856 of file fftpack.cpp.

References Hypervolume::n.

◆ rfftf()

void rfftf ( size_t  N,
double  data[],
double  wrk[] 
)

forward real transform

Definition at line 853 of file fftpack.cpp.

References Hypervolume::n.

◆ rffti()

void rffti ( size_t  N,
double  wrk[] 
)

initializer for real transforms

Definition at line 887 of file fftpack.cpp.

References Hypervolume::n.

Referenced by sinti().

◆ sint()

void sint ( size_t  n,
double  x[],
double  wsave[] 
)

Definition at line 960 of file fftpack.cpp.

References Hypervolume::n, and sint1().

Here is the call graph for this function:

◆ sint1()

void sint1 ( size_t  n,
double  war[],
double  was[],
double  xh[],
double  x[],
double  xxifac[] 
)

Definition at line 914 of file fftpack.cpp.

References Hypervolume::n.

Referenced by sint().

◆ sinti()

void sinti ( size_t  n,
double  wsave[] 
)

Definition at line 895 of file fftpack.cpp.

References Hypervolume::n, pi, rffti(), and sin().

Here is the call graph for this function:

◆ util_free_()

void util_free_ ( void *  ptr)

Definition at line 77 of file fftpack.cpp.

◆ util_malloc_()

void * util_malloc_ ( size_t  sz)

Definition at line 55 of file fftpack.cpp.

Variable Documentation

◆ pi

const double pi = 3.14159265358979

Definition at line 894 of file fftpack.cpp.

Referenced by SampleCmd::execute(), OptimizeCmd::run(), and sinti().