Package org.apfloat.aparapi
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
NTT steps for the
int element type aparapi transforms.- Since:
- 1.8.3
- Version:
- 1.8.3
- Author:
- Mikko Tommila
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmultiplyElements(ArrayAccess arrayAccess, int startRow, int startColumn, int rows, int columns, long length, long totalTransformLength, boolean isInverse, int modulus) Multiply each matrix element(i, j)bywi * j / totalTransformLength.voidtransformRows(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.IntNTTStepStrategy
createMultiplyElementsParallelRunnable, createTransformRowsParallelRunnable, getMaxTransformLengthMethods inherited from class org.apfloat.internal.IntTableFNT
inverseTableFNT, tableFNTMethods inherited from class org.apfloat.internal.IntModMath
createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negateMethods inherited from class org.apfloat.internal.IntElementaryModMath
getModulus, modAdd, modMultiply, modSubtract, setModulus
-
Constructor Details
-
IntAparapiNTTStepStrategy
public IntAparapiNTTStepStrategy()Default constructor.
-
-
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:NTTStepStrategyMultiply each matrix element(i, j)bywi * j / totalTransformLength. The matrix size is n1 x n2.- Specified by:
multiplyElementsin interfaceNTTStepStrategy- Overrides:
multiplyElementsin classIntNTTStepStrategy- Parameters:
arrayAccess- The memory array to multiply.startRow- Which row in the whole matrix the starting row in thearrayAccessis.startColumn- Which column in the whole matrix the starting column in thearrayAccessis.rows- The number of rows in thearrayAccessto 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 columns of the data matrix. Note that this method expects the data to be organized in columns, not rows. The argumentslengthandcountstill mean the length of one transform and number of transforms to be done.- Specified by:
transformRowsin interfaceNTTStepStrategy- Overrides:
transformRowsin classIntNTTStepStrategy- Parameters:
arrayAccess- The memory array to split to columns and to transform.length- Length of one transform (one columns).count- Number of columns.isInverse-trueif an inverse transform is performed,falseif a forward transform is performed.permute- If permutation should be done.modulus- Index of the modulus.- Throws:
ApfloatRuntimeException
-