/** * If true, a new batch of parallel random numbers is automatically precomputed in background as soon as one starts to consume numbers from the current batch (this gives faster random numbers, at the risk of computing more values than needed) */ public synchronized void setPreload(boolean preload) throws CLBuildException { this.preload = preload; if (preload && preloadEvent == null) { if (lastData == null) { preloadEvent = randomProgram.gen_numbers(queue, seeds, output, globalWorkSizes, null); } else if (consumedInts > 0) { preload(); } } } private synchronized CLEvent preload() throws CLBuildException {
public synchronized CLEvent transposeDoubles(CLBuffer<Double> a, int aRows, int aColumns, CLBuffer<Double> out, CLEvent... eventsToWaitFor) throws CLBuildException { return kernels.transposeDouble(queue, a, aRows, aColumns, out, new int[] { (int)aColumns, (int)aRows }, null, eventsToWaitFor ); }
public synchronized CLEvent transposeFloats(CLBuffer<Float> a, int aRows, int aColumns, CLBuffer<Float> out, CLEvent... eventsToWaitFor) throws CLBuildException { return kernels.transposeFloat(queue, a, aRows, aColumns, out, new int[] { (int)aColumns, (int)aRows }, null, eventsToWaitFor ); }
public synchronized CLKernel getKernel(Fun2 op, Primitive prim, boolean secondOperandIsScalar) throws CLBuildException { return getKernel(op, prim, prim, prim, secondOperandIsScalar); }
public CLKernels(CLQueue queue) throws IOException, CLBuildException { kernels = new LinearAlgebraUtils(queue); math = new ParallelMath(queue); context = queue.getContext(); this.queue = queue; }
public XORShiftRandom(CLProgram program) throws IOException { super(program, readRawSourceForClass(XORShiftRandom.class)); } CLKernel gen_numbers_kernel;
public LinearAlgebraKernels(CLContext context) throws IOException { super(context, readRawSourceForClass(LinearAlgebraKernels.class)); } public LinearAlgebraKernels(CLProgram program) throws IOException {
private synchronized CLEvent preload() throws CLBuildException { return preloadEvent = randomProgram.gen_numbers(queue, seeds, output, globalWorkSizes, null, preloadEvent); } private synchronized void waitForData(int n) {
/** * If true, a new batch of parallel random numbers is automatically precomputed in background as soon as one starts to consume numbers from the current batch (this gives faster random numbers, at the risk of computing more values than needed) */ public synchronized void setPreload(boolean preload) throws CLBuildException { this.preload = preload; if (preload && preloadEvent == null) { if (lastData == null) { preloadEvent = randomProgram.gen_numbers(queue, seeds, output, globalWorkSizes, null); } else if (consumedInts > 0) { preload(); } } } private synchronized CLEvent preload() throws CLBuildException {
public synchronized CLEvent transposeDouble(CLBuffer<Double> a, int aRows, int aColumns, CLBuffer<Double> out, CLEvent... eventsToWaitFor) throws CLBuildException { return kernels.transposeDouble(queue, a, aRows, aColumns, out, new int[] { (int)aColumns, (int)aRows }, null, eventsToWaitFor ); } Reductor<Float> addReductorFloat;
public XORShiftRandom(CLProgram program) throws IOException { super(program, readRawSourceForClass(XORShiftRandom.class)); } CLKernel gen_numbers_kernel;
public LinearAlgebraKernels(CLProgram program) throws IOException { super(program, readRawSourceForClass(LinearAlgebraKernels.class)); } CLKernel mulMatDouble_kernel;
public synchronized CLEvent transposeFloats(CLBuffer<Float> a, int aRows, int aColumns, CLBuffer<Float> out, CLEvent... eventsToWaitFor) throws CLBuildException { return kernels.transposeFloat(queue, a, aRows, aColumns, out, new int[] { (int)aColumns, (int)aRows }, null, eventsToWaitFor ); }
private synchronized CLEvent preload() throws CLBuildException { return preloadEvent = randomProgram.gen_numbers(queue, seeds, output, globalWorkSizes, null, preloadEvent); } private synchronized void waitForData(int n) {
public synchronized CLEvent transposeDouble(CLBuffer<Double> a, int aRows, int aColumns, CLBuffer<Double> out, CLEvent... eventsToWaitFor) throws CLBuildException { return kernels.transposeDouble(queue, a, aRows, aColumns, out, new int[] { (int)aColumns, (int)aRows }, null, eventsToWaitFor ); } Reductor<Float> addReductorFloat;
public XORShiftRandom(CLContext context) throws IOException { super(context, readRawSourceForClass(XORShiftRandom.class)); } public XORShiftRandom(CLProgram program) throws IOException {
public LinearAlgebraKernels(CLProgram program) throws IOException { super(program, readRawSourceForClass(LinearAlgebraKernels.class)); } CLKernel mulMatDouble_kernel;
public synchronized CLEvent transposeDoubles(CLBuffer<Double> a, int aRows, int aColumns, CLBuffer<Double> out, CLEvent... eventsToWaitFor) throws CLBuildException { return kernels.transposeDouble(queue, a, aRows, aColumns, out, new int[] { (int)aColumns, (int)aRows }, null, eventsToWaitFor ); }
public XORShiftRandom(CLContext context) throws IOException { super(context, readRawSourceForClass(XORShiftRandom.class)); } public XORShiftRandom(CLProgram program) throws IOException {
public LinearAlgebraKernels(CLContext context) throws IOException { super(context, readRawSourceForClass(LinearAlgebraKernels.class)); } public LinearAlgebraKernels(CLProgram program) throws IOException {