Package org.apfloat.internal
Class IntFactor3NTTStepStrategy
- java.lang.Object
-
- org.apfloat.internal.IntElementaryModMath
-
- org.apfloat.internal.IntModMath
-
- org.apfloat.internal.IntFactor3NTTStepStrategy
-
- All Implemented Interfaces:
Parallelizable,Factor3NTTStepStrategy
- Direct Known Subclasses:
IntAparapiFactor3NTTStepStrategy
public class IntFactor3NTTStepStrategy extends IntModMath implements Factor3NTTStepStrategy, Parallelizable
Steps for the factor-3 NTT.The transform is done using a parallel algorithm, if the data fits in memory.
All access to this class must be externally synchronized.
- Since:
- 1.7.0
- Version:
- 1.9.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classIntFactor3NTTStepStrategy.ColumnTransformRunnable
-
Constructor Summary
Constructors Constructor Description IntFactor3NTTStepStrategy()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ParallelRunnablecreateColumnTransformParallelRunnable(DataStorage dataStorage0, DataStorage dataStorage1, DataStorage dataStorage2, long startColumn, long columns, long power2length, long length, boolean isInverse, int modulus)Create a ParallelRunnable object for transforming the columns of the matrix using a 3-point NTT transform.longgetMaxTransformLength()Get the maximum transform length.voidtransformColumns(DataStorage dataStorage0, DataStorage dataStorage1, DataStorage dataStorage2, long startColumn, long columns, long power2length, long length, boolean isInverse, int modulus)Transform the columns of a matrix using a 3-point transform.-
Methods inherited from class org.apfloat.internal.IntModMath
createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate
-
Methods inherited from class org.apfloat.internal.IntElementaryModMath
getModulus, modAdd, modMultiply, modSubtract, setModulus
-
-
-
-
Method Detail
-
transformColumns
public void transformColumns(DataStorage dataStorage0, DataStorage dataStorage1, DataStorage dataStorage2, long startColumn, long columns, long power2length, long length, boolean isInverse, int modulus) throws ApfloatRuntimeException
Description copied from interface:Factor3NTTStepStrategyTransform the columns of a matrix using a 3-point transform.- Specified by:
transformColumnsin interfaceFactor3NTTStepStrategy- Parameters:
dataStorage0- The data of the first column.dataStorage1- The data of the second column.dataStorage2- The data of the third column.startColumn- The starting element index in the data storages to transform.columns- How many columns to transform.power2length- Length of the column transform.length- Length of total transform (three times the length of one column).isInverse-trueif an inverse transform is performed,falseif a forward transform is performed.modulus- Index of the modulus.- Throws:
ApfloatRuntimeException
-
getMaxTransformLength
public long getMaxTransformLength()
Description copied from interface:Factor3NTTStepStrategyGet the maximum transform length.- Specified by:
getMaxTransformLengthin interfaceFactor3NTTStepStrategy- Returns:
- The maximum transform length.
-
createColumnTransformParallelRunnable
protected ParallelRunnable createColumnTransformParallelRunnable(DataStorage dataStorage0, DataStorage dataStorage1, DataStorage dataStorage2, long startColumn, long columns, long power2length, long length, boolean isInverse, int modulus)
Create a ParallelRunnable object for transforming the columns of the matrix using a 3-point NTT transform.- Parameters:
dataStorage0- The data of the first column.dataStorage1- The data of the second column.dataStorage2- The data of the third column.startColumn- The starting element index in the data storages to transform.columns- How many columns to transform.power2length- Length of the column transform.length- Length of total transform (three times the length of one column).isInverse-trueif an inverse transform is performed,falseif a forward transform is performed.modulus- Index of the modulus.- Returns:
- A suitable object for performing the 3-point transforms in parallel.
-
-