Class MixedRadixFactor

java.lang.Object
ffx.numerics.fft.MixedRadixFactor
Direct Known Subclasses:
MixedRadixFactor2, MixedRadixFactor3, MixedRadixFactor4, MixedRadixFactor5, MixedRadixFactor6, MixedRadixFactor7, MixedRadixFactorPrime

public abstract class MixedRadixFactor extends Object
Mixed radix factor is extended by the pass classes to apply the mixed radix factor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final int
    The number of complex elements that will be processed in each inner loop iteration.
    protected static final int
    The number of complex elements that will be processed in each inner loop iteration.
    protected static final int
    The number of complex elements that will be processed in each inner loop iteration.
    protected static final int
    The number of complex elements that will be processed in each inner loop iteration.
    protected final int
    Equal to 2 * nextInput for interleaved complex data.
    protected final int
    Equal to 2 * innerLoopLimit for interleaved complex data.
    protected static final VectorSpecies<Double>
    The preferred vector species for double precision.
    protected final int
    The mixed radix factor.
    protected final int
    The increment for input data within the inner loop.
    protected final int
    The imaginary offset.
    protected final int
    The inner loop limit (product / factor).
    protected final int
    Increment for the inner loop.
    protected static final int
    The number of contiguous elements that will be read from the input data array.
    protected static final int
    The number of contiguous elements that will be read from the input data array.
    protected static final int
    The number of contiguous elements that will be read from the input data array.
    protected static final int
    The number of contiguous elements that will be read from the input data array.
    protected static final int
    The number of complex elements that will be processed in each inner loop iteration.
    protected static final int
    The number of complex elements that will be processed in each inner loop iteration.
    protected static final int
    The number of complex elements that will be processed in each inner loop iteration.
    protected static final int
    The number of complex elements that will be processed in each inner loop iteration.
    protected final int
    The size of the input.
    protected static final DoubleVector
    Vector used to change the sign of the imaginary members of the vector via multiplication.
    protected static final DoubleVector
    Vector used to change the sign of the imaginary members of the vector via multiplication.
    protected static final DoubleVector
    Vector used to change the sign of the imaginary members of the vector via multiplication.
    protected static final DoubleVector
    Vector used to change the sign of the imaginary members of the vector via multiplication.
    protected static final DoubleVector
    Vector used to change the sign of the real members of the vector via multiplication.
    protected static final DoubleVector
    Vector used to change the sign of the real members of the vector via multiplication.
    protected static final DoubleVector
    Vector used to change the sign of the real members of the vector via multiplication.
    protected static final DoubleVector
    Vector used to change the sign of the real members of the vector via multiplication.
    protected final int
    The next input (n / factor).
    protected final int
    The number of FFTs to process (default = 1).
    protected final int
    The outer loop limit (n / product).
    protected final int
    The product of all factors applied so far.
    protected static final VectorShuffle<Double>
    Shuffle used to swap real and imaginary members of the vector.
    protected static final VectorShuffle<Double>
    Shuffle used to swap real and imaginary members of the vector.
    protected static final VectorShuffle<Double>
    Shuffle used to swap real and imaginary members of the vector.
    protected static final VectorShuffle<Double>
    Shuffle used to swap real and imaginary members of the vector.
    protected final double[][]
    The twiddle factors for this pass.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the mixed radix factor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static void
    multiplyAndStore(double x_r, double x_i, double w_r, double w_i, double[] ret, int re, int im)
    Multiply two complex numbers [x_r, x_i] and [w_r, w_i] and store the result.
    protected abstract void
    passScalar(PassData passData)
    Apply the mixed radix factor using scalar operations.
    protected abstract void
    passSIMD(PassData passData)
    Apply the mixed radix factor using SIMD operations.
    Return a string representation of the mixed radix factor.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DOUBLE_SPECIES

      protected static final VectorSpecies<Double> DOUBLE_SPECIES
      The preferred vector species for double precision.
    • NEGATE_IM

      protected static final DoubleVector NEGATE_IM
      Vector used to change the sign of the imaginary members of the vector via multiplication.
    • NEGATE_RE

      protected static final DoubleVector NEGATE_RE
      Vector used to change the sign of the real members of the vector via multiplication.
    • SHUFFLE_RE_IM

      protected static final VectorShuffle<Double> SHUFFLE_RE_IM
      Shuffle used to swap real and imaginary members of the vector.
    • LENGTH

      protected static final int LENGTH
      The number of contiguous elements that will be read from the input data array.
    • LOOP

      protected static final int LOOP
      The number of complex elements that will be processed in each inner loop iteration. The number of elements to process in the inner loop must be evenly divisible by this loop increment.
    • BLOCK_LOOP

      protected static final int BLOCK_LOOP
      The number of complex elements that will be processed in each inner loop iteration. The number of elements to process in the inner loop must be evenly divisible by this loop increment.
    • NEGATE_IM_128

      protected static final DoubleVector NEGATE_IM_128
      Vector used to change the sign of the imaginary members of the vector via multiplication.
    • NEGATE_RE_128

      protected static final DoubleVector NEGATE_RE_128
      Vector used to change the sign of the real members of the vector via multiplication.
    • SHUFFLE_RE_IM_128

      protected static final VectorShuffle<Double> SHUFFLE_RE_IM_128
      Shuffle used to swap real and imaginary members of the vector.
    • LENGTH_128

      protected static final int LENGTH_128
      The number of contiguous elements that will be read from the input data array.
    • LOOP_128

      protected static final int LOOP_128
      The number of complex elements that will be processed in each inner loop iteration. The number of elements to process in the inner loop must be evenly divisible by this loop increment.
    • BLOCK_LOOP_128

      protected static final int BLOCK_LOOP_128
      The number of complex elements that will be processed in each inner loop iteration. The number of elements to process in the inner loop must be evenly divisible by this loop increment.
    • NEGATE_IM_256

      protected static final DoubleVector NEGATE_IM_256
      Vector used to change the sign of the imaginary members of the vector via multiplication.
    • NEGATE_RE_256

      protected static final DoubleVector NEGATE_RE_256
      Vector used to change the sign of the real members of the vector via multiplication.
    • SHUFFLE_RE_IM_256

      protected static final VectorShuffle<Double> SHUFFLE_RE_IM_256
      Shuffle used to swap real and imaginary members of the vector.
    • LENGTH_256

      protected static final int LENGTH_256
      The number of contiguous elements that will be read from the input data array.
    • LOOP_256

      protected static final int LOOP_256
      The number of complex elements that will be processed in each inner loop iteration. The number of elements to process in the inner loop must be evenly divisible by this loop increment.
    • BLOCK_LOOP_256

      protected static final int BLOCK_LOOP_256
      The number of complex elements that will be processed in each inner loop iteration. The number of elements to process in the inner loop must be evenly divisible by this loop increment.
    • NEGATE_IM_512

      protected static final DoubleVector NEGATE_IM_512
      Vector used to change the sign of the imaginary members of the vector via multiplication.
    • NEGATE_RE_512

      protected static final DoubleVector NEGATE_RE_512
      Vector used to change the sign of the real members of the vector via multiplication.
    • SHUFFLE_RE_IM_512

      protected static final VectorShuffle<Double> SHUFFLE_RE_IM_512
      Shuffle used to swap real and imaginary members of the vector.
    • LENGTH_512

      protected static final int LENGTH_512
      The number of contiguous elements that will be read from the input data array.
    • LOOP_512

      protected static final int LOOP_512
      The number of complex elements that will be processed in each inner loop iteration. The number of elements to process in the inner loop must be evenly divisible by this loop increment.
    • BLOCK_LOOP_512

      protected static final int BLOCK_LOOP_512
      The number of complex elements that will be processed in each inner loop iteration. The number of elements to process in the inner loop must be evenly divisible by this loop increment.
    • n

      protected final int n
      The size of the input.
    • nFFTs

      protected final int nFFTs
      The number of FFTs to process (default = 1).
    • im

      protected final int im
      The imaginary offset.
    • factor

      protected final int factor
      The mixed radix factor.
    • product

      protected final int product
      The product of all factors applied so far.
    • outerLoopLimit

      protected final int outerLoopLimit
      The outer loop limit (n / product).
    • innerLoopLimit

      protected final int innerLoopLimit
      The inner loop limit (product / factor).
    • nextInput

      protected final int nextInput
      The next input (n / factor). This is the separation between the input data for each pass.
    • di

      protected final int di
      Equal to 2 * nextInput for interleaved complex data. Equal to nextInput for separate real and imaginary arrays.
    • dj

      protected final int dj
      Equal to 2 * innerLoopLimit for interleaved complex data. Equal to innerLoopLimit for separate real and imaginary arrays.
    • twiddles

      protected final double[][] twiddles
      The twiddle factors for this pass.
    • ii

      protected final int ii
      The increment for input data within the inner loop. This is equal to 2 for interleaved complex data. This is equal to 1 for separate real and imaginary arrays.
    • jstep

      protected final int jstep
      Increment for the inner loop.
  • Constructor Details

    • MixedRadixFactor

      public MixedRadixFactor(PassConstants passConstants)
      Constructor for the mixed radix factor.
      Parameters:
      passConstants - the pass constants.
  • Method Details

    • toString

      public String toString()
      Return a string representation of the mixed radix factor.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the mixed radix factor.
    • passScalar

      protected abstract void passScalar(PassData passData)
      Apply the mixed radix factor using scalar operations.
      Parameters:
      passData - the pass data.
    • passSIMD

      protected abstract void passSIMD(PassData passData)
      Apply the mixed radix factor using SIMD operations.
      Parameters:
      passData - the pass data.
    • multiplyAndStore

      protected static void multiplyAndStore(double x_r, double x_i, double w_r, double w_i, double[] ret, int re, int im)
      Multiply two complex numbers [x_r, x_i] and [w_r, w_i] and store the result.
      Parameters:
      x_r - the real part of the complex number.
      x_i - the imaginary part of the complex number.
      w_r - the real part of the twiddle factor.
      w_i - the imaginary part of the twiddle factor.
      ret - the array to store the result.
      re - the real part index in the result array.
      im - the imaginary part index in the result array.