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, transformRows
getTransformLength, inverseTableFNT, tableFNT
createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate
getModulus, modAdd, modMultiply, modSubtract, setModulus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTransformLength
public void transform(DataStorage dataStorage, int modulus) throws ApfloatRuntimeException
NTTStrategy
Multiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.
transform
in interface NTTStrategy
transform
in class FloatTableFNTStrategy
dataStorage
- The data to be transformed.modulus
- Number of modulus to use (in case the transform supports multiple moduli).ApfloatRuntimeException
public void inverseTransform(DataStorage dataStorage, int modulus, long totalTransformLength) throws ApfloatRuntimeException
NTTStrategy
Multiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.
inverseTransform
in interface NTTStrategy
inverseTransform
in class FloatTableFNTStrategy
dataStorage
- 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
Copyright © 2011. All Rights Reserved.