public class FloatSixStepFNTStrategy extends FloatParallelFNTStrategy
When the data to be transformed is considered to be an n1 x n2 matrix of data, instead of a linear array, the six steps are as follows:
This algorithm is parallelized so that the row transforms are done in parallel
using multiple threads, if the number of processors is greater than one
in ApfloatContext.getNumberOfProcessors().
If the data block to be transformed is larger than the shared memory treshold setting
in the current ApfloatContext, this class will synchronize all data access on
the shared memory lock retrieved from ApfloatContext.getSharedMemoryLock().
All access to this class must be externally synchronized.
parallelRunner| Constructor and Description |
|---|
FloatSixStepFNTStrategy()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
inverseTransform(DataStorage dataStorage,
int modulus,
long totalTransformLength)
Perform an inverse transform on the data.
|
void |
transform(DataStorage dataStorage,
int modulus)
Perform a forward transform on the data.
|
multiplyElements, setParallelRunner, transformRowsgetTransformLength, inverseTableFNT, tableFNTcreateWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negategetModulus, modAdd, modMultiply, modSubtract, setModulusclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTransformLengthpublic void transform(DataStorage dataStorage, int modulus) throws ApfloatRuntimeException
NTTStrategyMultiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.
transform in interface NTTStrategytransform in class FloatTableFNTStrategydataStorage - The data to be transformed.modulus - Number of modulus to use (in case the transform supports multiple moduli).ApfloatRuntimeExceptionpublic void inverseTransform(DataStorage dataStorage, int modulus, long totalTransformLength) throws ApfloatRuntimeException
NTTStrategyMultiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.
inverseTransform in interface NTTStrategyinverseTransform in class FloatTableFNTStrategydataStorage - The data to be transformed.modulus - Number of modulus to use (in case the transform supports multiple moduli).totalTransformLength - Total transform length; the final result elements are divided by this value.ApfloatRuntimeException