Class ParallelThreeNTTConvolutionStrategy

  • All Implemented Interfaces:
    ConvolutionStrategy

    public class ParallelThreeNTTConvolutionStrategy
    extends ThreeNTTConvolutionStrategy
    Convolution using three Number Theoretic Transforms and the CRT to get the final result, using multiple threads in parallel.

    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 threshold 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.

    Since:
    1.7.0
    Version:
    1.9.0
    • Field Detail

      • locks

        private static java.util.Map<java.lang.Object,​java.util.concurrent.locks.Lock> locks
      • key

        private java.lang.Object key
    • Constructor Detail

      • ParallelThreeNTTConvolutionStrategy

        public ParallelThreeNTTConvolutionStrategy​(int radix,
                                                   NTTStrategy nttStrategy)
        Creates a new convoluter that uses the specified transform for transforming the data.
        Parameters:
        radix - The radix to be used.
        nttStrategy - The transform to be used.