public abstract class DoubleParallelFNTStrategy extends DoubleTableFNTStrategy implements ParallelNTTStrategy
Note that to get any performance gain from running many threads in parallel, the JVM must be executing native threads. If the JVM is running in green threads mode, there is no advantage of having multiple threads, as the JVM will in fact execute just one thread and divide its time to multiple simulated threads.
|Modifier and Type||Field and Description|
The parallel runner.
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
Multiply each matrix element
Set the parallel runner to be used when executing the transform.
Transform the rows of the data matrix.
getTransformLength, inverseTableFNT, inverseTransform, tableFNT, transform
createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate
getModulus, modAdd, modMultiply, modSubtract, setModulus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected ParallelRunner parallelRunner
public void setParallelRunner(ParallelRunner parallelRunner)
protected void multiplyElements(ArrayAccess arrayAccess, int startRow, int rows, int columns, double w, double scaleFactor) throws ApfloatRuntimeException
wi * j * scaleFactor. The matrix size is n1 x n2.
arrayAccess- The memory array to multiply.
startRow- Which row in the whole matrix the starting row in the
rows- The number of rows in the
columns- The number of columns in the matrix (= n2).
w- The n:th root of unity (where n = n1 * n2).
scaleFactor- An extra factor by which all elements are multiplied.
protected void transformRows(int length, int count, boolean isInverse, ArrayAccess arrayAccess, double wTable, int permutationTable) throws ApfloatRuntimeException
length- Length of one transform (one row).
count- Number of rows.
trueif an inverse transform is performed,
falseif a forward transform is performed.
arrayAccess- The memory array to split to rows and to transform.
wTable- Table of powers of n:th root of unity (where n is the transform
permutationTable- Table of permutation indexes, or
nullif no permutation should be done.