roots_helper< CC, UU, SS > Struct Template Reference

#include <fft_naive.hpp>

List of all members.

Classes

Public Types

Static Public Member Functions


Detailed Description

template<typename CC, typename UU, typename SS>
struct mmx::roots_helper< CC, UU, SS >

Definition at line 24 of file fft_naive.hpp.


Member Typedef Documentation

typedef CC C

Definition at line 25 of file fft_naive.hpp.

typedef SS S

Definition at line 27 of file fft_naive.hpp.

typedef UU U

Definition at line 26 of file fft_naive.hpp.


Member Function Documentation

static U* create_roots ( nat  n,
const format< C > &  fm 
) [inline, static]

Definition at line 30 of file fft_naive.hpp.

References mmx::bit_mirror().

00030                                             {
00031     nat k= primitive_root_max_order<C> (2); (void) k;
00032     VERIFY (k == 0 || n <= k, "maximum order exceeded");
00033     VERIFY (n >= 2, "size must be at least two");
00034     U* roots= mmx_new<U> (n);
00035     for (nat i=0; i<n; i+=2) {
00036       U temp = primitive_root<C> (n, bit_mirror (i, n), fm);
00037       roots[i]  = temp;
00038       roots[i+1]= primitive_root<C> (n, i==0? 0: n - bit_mirror (i, n), fm);
00039     }
00040     return roots; }

static void destroy_roots ( U u,
nat  n 
) [inline, static]

Definition at line 43 of file fft_naive.hpp.

00043                               {
00044     mmx_delete<U> (u, n); }

static void dfft_cross ( C c1,
C c2,
const U u 
) [inline, static]

Definition at line 53 of file fft_naive.hpp.

Referenced by roots_helper< CC, UU, SS >::dtft_cross().

00053                                         {
00054     C temp= (*u) * (*c2);
00055     *c2   = (*c1) - temp;
00056     *c1   = (*c1) + temp; }

static void dtft_cross ( C c1,
C c2,
const U u 
) [inline, static]

Definition at line 72 of file fft_naive.hpp.

References roots_helper< CC, UU, SS >::dfft_cross(), and mmx::invert().

00072                                         {
00073     static S h= invert (S (2));
00074     dfft_cross (c1, c2, u);
00075     *c1 *= h;
00076     *c2 *= h; }

static void dtft_cross ( C c1,
C c2 
) [inline, static]

Definition at line 65 of file fft_naive.hpp.

References roots_helper< CC, UU, SS >::fft_cross(), and mmx::invert().

00065                             {
00066     static S h= invert (S (2));
00067     fft_cross (c1, c2);
00068     *c1 *= h;
00069     *c2 *= h; }

static void fft_cross ( C c1,
C c2 
) [inline, static]

Definition at line 47 of file fft_naive.hpp.

Referenced by roots_helper< CC, UU, SS >::dtft_cross().

00047                            {
00048     C temp= (*c2);
00049     *c2   = (*c1) - temp;
00050     *c1   = (*c1) + temp; }

static void ifft_cross ( C c1,
C c2,
const U u 
) [inline, static]

Definition at line 59 of file fft_naive.hpp.

00059                                         {
00060     C temp= *c2;
00061     *c2   = (*u ) * ((*c1) - temp);
00062     *c1   = (*c1) + temp; }

static void itft_flip ( C c1,
C c2 
) [inline, static]

Definition at line 86 of file fft_naive.hpp.

References mmx::invert().

00086                            {
00087     static S h= invert (S(2));
00088     *c1  += (*c1) - (*c2);
00089     *c2   = h * ((*c1) - (*c2)); }

static void itft_flip ( C c1,
C c2,
const U u 
) [inline, static]

Definition at line 79 of file fft_naive.hpp.

References mmx::invert().

00079                                        {
00080     static S h= invert (S(2));
00081     C temp= (*u) * (*c2);
00082     *c1  += (*c1) - temp;
00083     *c2   = h * ((*c1) - temp); }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for algebramix by  doxygen 1.6.1