public SpecialPointCollector(int wordsPerNumber, Pollard_Rho pRho, OpenCLBuffer <uint> gpuSpecialPointsBuffer, StartingPointGenerator startingPointGenerator) { this.wordsPerNumber = wordsPerNumber; this.pRho = pRho; this.gpuSpecialPointsBuffer = gpuSpecialPointsBuffer; this.startingPointGenerator = startingPointGenerator; }
public DLPSolver(InputTuple input) { modulus = input.Modulus; if (modulus % 2 == 0) { throw new NotImplementedException("At the moment, it is not possible to use an even number for a modulus."); } generator = input.Generator; order = input.Order; element = input.Element; wordsPerNumber = modulus.ToUintArray().Length; rAsPower = 32 * wordsPerNumber; Pollard_Rho pRho = new Pollard_Rho(input, rAsPower); // Initialize the startingPointGenerator. gpuStartingPointsBuffer = new OpenCLBuffer <uint>(program, new uint[4 * NUM_GPU_THREADS * wordsPerNumber]); startingPointGenerator = new StartingPointGenerator(input, rAsPower, wordsPerNumber, pRho, program, gpuStartingPointsBuffer); // Initialize the specialPointCollector. gpuSpecialPointsBuffer = new OpenCLBuffer <uint>(program, new uint[2 * wordsPerNumber * 4 * NUM_GPU_THREADS]); specialPointCollector = new SpecialPointCollector(wordsPerNumber, pRho, gpuSpecialPointsBuffer, startingPointGenerator); }