public class IntFactor3NTTStepStrategy extends IntModMath implements Factor3NTTStepStrategy, Parallelizable
The transform is done using a parallel algorithm, if the data fits in memory.
All access to this class must be externally synchronized.
Constructor and Description |
---|
IntFactor3NTTStepStrategy()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
long |
getMaxTransformLength()
Get the maximum transform length.
|
void |
transformColumns(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.
|
createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate
getModulus, modAdd, modMultiply, modSubtract, setModulus
public IntFactor3NTTStepStrategy()
public void transformColumns(DataStorage dataStorage0, DataStorage dataStorage1, DataStorage dataStorage2, long startColumn, long columns, long power2length, long length, boolean isInverse, int modulus) throws ApfloatRuntimeException
Factor3NTTStepStrategy
transformColumns
in interface Factor3NTTStepStrategy
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
- true
if an inverse transform is performed, false
if a forward transform is performed.modulus
- Index of the modulus.ApfloatRuntimeException
public long getMaxTransformLength()
Factor3NTTStepStrategy
getMaxTransformLength
in interface Factor3NTTStepStrategy
protected ParallelRunnable createColumnTransformParallelRunnable(DataStorage dataStorage0, DataStorage dataStorage1, DataStorage dataStorage2, long startColumn, long columns, long power2length, long length, boolean isInverse, int modulus)
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
- true
if an inverse transform is performed, false
if a forward transform is performed.modulus
- Index of the modulus.Copyright © 2018. All rights reserved.