algebramix_doc 0.3
fft_triadic_naive_transformer< C, VV > Class Template Reference

#include <fft_triadic_naive.hpp>

List of all members.

Public Types

Public Member Functions

Public Attributes


Detailed Description

template<typename C, typename VV = std_roots_triadic>
class mmx::fft_triadic_naive_transformer< C, VV >

Definition at line 83 of file fft_triadic_naive.hpp.


Member Typedef Documentation

typedef V::template helper<C>::roots_type R

Definition at line 86 of file fft_triadic_naive.hpp.

typedef R::S S

Definition at line 88 of file fft_triadic_naive.hpp.

typedef R::U U

Definition at line 87 of file fft_triadic_naive.hpp.

typedef VV V

Definition at line 85 of file fft_triadic_naive.hpp.


Constructor & Destructor Documentation

fft_triadic_naive_transformer ( nat  n) [inline]

Definition at line 96 of file fft_triadic_naive.hpp.

References fft_triadic_naive_transformer< C, VV >::depth.

                                              :
    depth (log_3 (n)), len (n), roots (R::create_roots (n)),
                                stoor (R::create_stoor (n)) {
    VERIFY (n == binpow ((nat) 3, depth), "power of three expected"); }

Member Function Documentation

void dfft_triadic ( CC *  c,
nat  stride,
nat  shift,
nat  steps,
nat  step1,
nat  step2 
) [inline]

Definition at line 105 of file fft_triadic_naive.hpp.

References fft_triadic_naive_transformer< C, VV >::roots.

Referenced by fft_triadic_naive_transformer< C, VV >::dfft_triadic(), and fft_triadic_naive_transformer< C, VV >::direct_transform_triadic().

                                                 {
    // In place direct triadic fft of
    // c[0], c[stride], ..., c[(3^steps-1) stride]
    // Only performs steps from step1 until step2-1
    // Roots start at roots + shift
    typedef typename V::template helper<CC>::roots_type RR;
    for (nat step= step1; step < step2; step++) {
      //mmout << "step " << step << ": " << flush_now;
      nat todo= binpow (3, steps - 1 - step);
      CC* cc  = c;
      U * uu  = roots + (shift / todo);
      for (nat j= 0; j < (nat) binpow (3, step); j++) {
        for (nat k= 0; k < todo; k++) {
          RR::dfft_cross (cc, cc + stride * todo,
                          cc + ((stride * todo) << 1), uu, uu+1, uu+2);
          cc += stride;
        }
        cc += (stride * todo) << 1;
        uu += 3;
      }
    }
  }
void dfft_triadic ( CC *  c,
nat  stride,
nat  shift,
nat  steps 
) [inline]

Definition at line 155 of file fft_triadic_naive.hpp.

References fft_triadic_naive_transformer< C, VV >::dfft_triadic().

                                                         {
    dfft_triadic (c, stride, shift, steps, 0, steps);
  }
void direct_transform_triadic ( C c) [inline]
void ifft_triadic ( CC *  c,
nat  stride,
nat  shift,
nat  steps 
) [inline]

Definition at line 160 of file fft_triadic_naive.hpp.

References fft_triadic_naive_transformer< C, VV >::ifft_triadic().

                                                         {
    ifft_triadic (c, stride, shift, steps, 0, steps);
  }
void ifft_triadic ( CC *  c,
nat  stride,
nat  shift,
nat  steps,
nat  step1,
nat  step2 
) [inline]

Definition at line 130 of file fft_triadic_naive.hpp.

References fft_triadic_naive_transformer< C, VV >::stoor.

Referenced by fft_triadic_naive_transformer< C, VV >::ifft_triadic(), and fft_triadic_naive_transformer< C, VV >::inverse_transform_triadic().

                                                 {
    // In place inverse triadic fft of
    // c[0], c[stride], ..., c[(3^steps-1) stride]
    // Only performs steps from step2-1 until step1
    // Roots start at roots + shift
    typedef typename V::template helper<CC>::roots_type RR;
    for (int step= step2-1; step >= ((int) step1); step--) {
      //mmout << "step " << step << ": " << flush_now;
      nat todo= binpow (3, steps - 1 - step);
      CC* cc  = c;
      U * uu  = stoor + (shift / todo);
      for (nat j= 0; j < (nat) binpow (3, step); j++) {
        for (nat k= 0; k < todo; k++) {
          RR::ifft_cross (cc, cc + stride * todo,
                          cc + ((stride * todo) << 1), uu, uu+1, uu+2);
          cc += stride;
        }
        cc += (stride * todo) << 1;
        uu += 3;
      }
    }
  }
void inverse_transform_triadic ( C c,
bool  shift = true 
) [inline]

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines