# Class ColumnSixStepFNTStrategy

java.lang.Object
org.apfloat.internal.AbstractStepFNTStrategy
org.apfloat.internal.SixStepFNTStrategy
org.apfloat.aparapi.ColumnSixStepFNTStrategy

All Implemented Interfaces:
  `DecorableNTTStrategy, Parallelizable, NTTStrategy`

Direct Known Subclasses:
  `IntAparapiColumnSixStepFNTStrategy, LongAparapiColumnSixStepFNTStrategy`

public class ColumnSixStepFNTStrategy extends SixStepFNTStrategy
Six-step NTT implementation that processes the data in the columns of the matrix.

This transform only works together with an `NTTStepStrategy` implementation that processes the data in columns instead of rows and a `MatrixStrategy` implementation that can transpose the data.

The data size should be sufficiently large to meet the parallelization needs of the GPU. The GPU global size i.e. the number of columns in the data matrix should be at least 1024.

Since:
  1.8.3
Version:
  1.8.3
Author:
  Mikko Tommila

- ## Field Summary

  ### Fields inherited from class SixStepFNTStrategy

  `matrixStrategy`

  ### Fields inherited from class AbstractStepFNTStrategy

  `stepStrategy`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ColumnSixStepFNTStrategy(NTTStepStrategy stepStrategy, MatrixStrategy matrixStrategy)`
  Basic constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `multiplyElements(ArrayAccess arrayAccess, int rows, int columns, long length, long totalTransformLength, boolean isInverse, int modulus)`
  Multiply each matrix element by a power of the n:th root of unity.
  `protected void`
  `transposeInitial(ArrayAccess arrayAccess, int n1, int n2, boolean isInverse)`
  The initial transpose of the forward transform, or the final transpose of the inverse transform, to transpose the columns of the matrix to be rows.
  `protected void`
  `transposeMiddle(ArrayAccess arrayAccess, int n1, int n2, boolean isInverse)`
  The second transpose of either the forward or inverse transform.

  ### Methods inherited from class SixStepFNTStrategy

  `inverseTransform, transform, transformFirst, transformSecond, transposeFinal`

  ### Methods inherited from class AbstractStepFNTStrategy

  `getTransformLength, inverseTransform, transform`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface DecorableNTTStrategy

  `postTransform, preTransform`

- ## Constructor Details

  - ### ColumnSixStepFNTStrategy

    public ColumnSixStepFNTStrategy(NTTStepStrategy stepStrategy, MatrixStrategy matrixStrategy)
    Basic constructor.
    Parameters:
      `stepStrategy` - A step strategy that can process data in columns.
      `matrixStrategy` - A matrix strategy that can process the data.

- ## Method Details

  - ### transposeInitial

    protected void transposeInitial(ArrayAccess arrayAccess, int n1, int n2, boolean isInverse)
    Description copied from class: `SixStepFNTStrategy`
    The initial transpose of the forward transform, or the final transpose of the inverse transform, to transpose the columns of the matrix to be rows. This step is needed in the six-step algorithm but is omitted in the four-step algorithm.
    Overrides:
      `transposeInitial` in class `SixStepFNTStrategy`
    Parameters:
      `arrayAccess` - Accessor to the matrix data. This data will be transposed.
      `n1` - Number of rows in the matrix.
      `n2` - Number of columns in the matrix.
      `isInverse` - `true` if an inverse transform is performed, `false` if a forward transform is performed.

  - ### transposeMiddle

    protected void transposeMiddle(ArrayAccess arrayAccess, int n1, int n2, boolean isInverse)
    Description copied from class: `SixStepFNTStrategy`
    The second transpose of either the forward or inverse transform. Normally this step is always required as the four-step algorithm only transforms columns of the matrix and the six-step algorithm transforms only rows.
    Overrides:
      `transposeMiddle` in class `SixStepFNTStrategy`
    Parameters:
      `arrayAccess` - Accessor to the matrix data. This data will be transposed.
      `n1` - Number of rows in the matrix.
      `n2` - Number of columns in the matrix.
      `isInverse` - `true` if an inverse transform is performed, `false` if a forward transform is performed.

  - ### multiplyElements

    protected void multiplyElements(ArrayAccess arrayAccess, int rows, int columns, long length, long totalTransformLength, boolean isInverse, int modulus)
    Description copied from class: `SixStepFNTStrategy`
    Multiply each matrix element by a power of the n:th root of unity.
    Overrides:
      `multiplyElements` in class `SixStepFNTStrategy`
    Parameters:
      `arrayAccess` - The memory array to multiply.
      `rows` - The number of rows in the `arrayAccess` to multiply.
      `columns` - The number of columns in the matrix (= n2).
      `length` - The length of data in the matrix being transformed.
      `totalTransformLength` - The total transform length, for the scaling factor. Used only for the inverse case.
      `isInverse` - If the multiplication is done for the inverse transform or not.
      `modulus` - Index of the modulus.