public class ParallelThreeNTTConvolutionStrategy extends ThreeNTTConvolutionStrategy
This algorithm is parallelized so that all operations 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.
carryCRTStrategy, nttStrategy, stepStrategy
Constructor and Description |
---|
ParallelThreeNTTConvolutionStrategy(int radix,
NTTStrategy nttStrategy)
Creates a new convoluter that uses the specified
transform for transforming the data.
|
Modifier and Type | Method and Description |
---|---|
protected void |
lock(long length)
Lock the execution against a synchronization lock.
|
protected void |
unlock()
Remove the synchronization lock.
|
autoConvolute, autoConvoluteOne, convolute, convoluteOne, createCachedDataStorage, createDataStorage
public ParallelThreeNTTConvolutionStrategy(int radix, NTTStrategy nttStrategy)
radix
- The radix to be used.nttStrategy
- The transform to be used.protected void lock(long length)
ThreeNTTConvolutionStrategy
lock
in class ThreeNTTConvolutionStrategy
length
- The length of the data being processed for determining the type of lock to use.protected void unlock()
ThreeNTTConvolutionStrategy
unlock
in class ThreeNTTConvolutionStrategy
Copyright © 2019. All rights reserved.