Class LongAparapiNTTStepStrategy

  • All Implemented Interfaces:
    org.apfloat.internal.Parallelizable, org.apfloat.spi.NTTStepStrategy

    public class LongAparapiNTTStepStrategy
    extends org.apfloat.internal.LongNTTStepStrategy
    NTT steps for the long element type aparapi transforms.
    Since:
    1.8.3
    Version:
    1.8.3
    Author:
    Mikko Tommila
    • Method Summary

      Modifier and Type Method Description
      void multiplyElements​(org.apfloat.spi.ArrayAccess arrayAccess, int startRow, int startColumn, int rows, int columns, long length, long totalTransformLength, boolean isInverse, int modulus)  
      void transformRows​(org.apfloat.spi.ArrayAccess arrayAccess, int length, int count, boolean isInverse, boolean permute, int modulus)
      Transform the columns of the data matrix.
      • Methods inherited from class org.apfloat.internal.LongNTTStepStrategy

        createMultiplyElementsParallelRunnable, createTransformRowsParallelRunnable, getMaxTransformLength
      • Methods inherited from class org.apfloat.internal.LongTableFNT

        inverseTableFNT, tableFNT
      • Methods inherited from class org.apfloat.internal.LongModMath

        createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate
      • Methods inherited from class org.apfloat.internal.LongElementaryModMath

        getModulus, modAdd, modMultiply, modSubtract, setModulus
    • Constructor Detail

      • LongAparapiNTTStepStrategy

        public LongAparapiNTTStepStrategy()
        Default constructor.
    • Method Detail

      • multiplyElements

        public void multiplyElements​(org.apfloat.spi.ArrayAccess arrayAccess,
                                     int startRow,
                                     int startColumn,
                                     int rows,
                                     int columns,
                                     long length,
                                     long totalTransformLength,
                                     boolean isInverse,
                                     int modulus)
                              throws org.apfloat.ApfloatRuntimeException
        Specified by:
        multiplyElements in interface org.apfloat.spi.NTTStepStrategy
        Overrides:
        multiplyElements in class org.apfloat.internal.LongNTTStepStrategy
        Throws:
        org.apfloat.ApfloatRuntimeException
      • transformRows

        public void transformRows​(org.apfloat.spi.ArrayAccess arrayAccess,
                                  int length,
                                  int count,
                                  boolean isInverse,
                                  boolean permute,
                                  int modulus)
                           throws org.apfloat.ApfloatRuntimeException
        Transform the columns of the data matrix. Note that this method expects the data to be organized in columns, not rows. The arguments length and count still mean the length of one transform and number of transforms to be done.
        Specified by:
        transformRows in interface org.apfloat.spi.NTTStepStrategy
        Overrides:
        transformRows in class org.apfloat.internal.LongNTTStepStrategy
        Parameters:
        arrayAccess - The memory array to split to columns and to transform.
        length - Length of one transform (one columns).
        count - Number of columns.
        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:
        org.apfloat.ApfloatRuntimeException