# Class IntAparapiNTTStepStrategy

java.lang.Object
org.apfloat.internal.IntElementaryModMath
org.apfloat.internal.IntModMath
org.apfloat.internal.IntTableFNT
org.apfloat.internal.IntNTTStepStrategy
org.apfloat.aparapi.IntAparapiNTTStepStrategy

All Implemented Interfaces:
  `Parallelizable, NTTStepStrategy`

public class IntAparapiNTTStepStrategy extends IntNTTStepStrategy
NTT steps for the `int` element type aparapi transforms.

Since:
  1.8.3
Version:
  1.15.0
Author:
  Mikko Tommila

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IntAparapiNTTStepStrategy(boolean rowOrientation)`
  Basic constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `multiplyElements(ArrayAccess arrayAccess, int startRow, int startColumn, int rows, int columns, long length, long totalTransformLength, boolean isInverse, int modulus)`
  Multiply each matrix element `(i, j)` by `wi * j / totalTransformLength`.
  `void`
  `transformRows(ArrayAccess arrayAccess, int length, int count, boolean isInverse, boolean permute, int modulus)`
  Transform the rows or columns of the data matrix.

  ### Methods inherited from class IntNTTStepStrategy

  `createMultiplyElementsParallelRunnable, createTransformRowsParallelRunnable, getMaxTransformLength`

  ### Methods inherited from class IntTableFNT

  `inverseTableFNT, tableFNT`

  ### Methods inherited from class IntModMath

  `createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate`

  ### Methods inherited from class IntElementaryModMath

  `getModulus, modAdd, modMultiply, modSubtract, setModulus`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### IntAparapiNTTStepStrategy

    public IntAparapiNTTStepStrategy(boolean rowOrientation)
    Basic constructor.
    Parameters:
      `rowOrientation` - If the data is using row orientation.

- ## Method Details

  - ### multiplyElements

    public void multiplyElements(ArrayAccess arrayAccess, int startRow, int startColumn, int rows, int columns, long length, long totalTransformLength, boolean isInverse, int modulus) throws ApfloatRuntimeException
    Description copied from interface: `NTTStepStrategy`
    Multiply each matrix element `(i, j)` by `wi * j / totalTransformLength`. The matrix size is n1 x n2.
    Specified by:
      `multiplyElements` in interface `NTTStepStrategy`
    Overrides:
      `multiplyElements` in class `IntNTTStepStrategy`
    Parameters:
      `arrayAccess` - The memory array to multiply.
      `startRow` - Which row in the whole matrix the starting row in the `arrayAccess` is.
      `startColumn` - Which column in the whole matrix the starting column in the `arrayAccess` is.
      `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.
    Throws:
      `ApfloatRuntimeException`

  - ### transformRows

    public void transformRows(ArrayAccess arrayAccess, int length, int count, boolean isInverse, boolean permute, int modulus) throws ApfloatRuntimeException
    Transform the rows or columns of the data matrix. If the data is oriented in rows, transforms physically the rows. If the data is oriented in columns, transforms physically columns.
    Specified by:
      `transformRows` in interface `NTTStepStrategy`
    Overrides:
      `transformRows` in class `IntNTTStepStrategy`
    Parameters:
      `arrayAccess` - The memory array to split and transform.
      `length` - Length of one transform.
      `count` - Number of transforms to be done.
      `isInverse` - `true` if an inverse transform is performed, `false` if a forward transform is performed.
      `permute` - If permutation should be done.
      `modulus` - Index of the modulus.
    Throws:
      `ApfloatRuntimeException`