public synchronized CLEvent multiplyFloats( CLBuffer<Float> a, long aRows, long aColumns, CLBuffer<Float> b, long bRows, long bColumns, CLBuffer<Float> out, //long outRows, long outColumns, CLEvent... eventsToWaitFor) throws CLBuildException { long outRows = aRows; long outColumns = bColumns; return kernels.mulMatFloat(queue, a, (int)aColumns, b, (int)bColumns, out, new int[] { (int)outRows, (int)outColumns }, null, eventsToWaitFor ); } Reductor<Double> addReductorDouble;
public LinearAlgebraKernels(CLContext context) throws IOException { super(context, readRawSourceForClass(LinearAlgebraKernels.class)); } public LinearAlgebraKernels(CLProgram program) throws IOException {
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 mulMatDouble(CLQueue commandQueue, CLBuffer<Double > a, int aColumns, CLBuffer<Double > b, int bColumns, CLBuffer<Double > c, int globalWorkSizes[], int localWorkSizes[], CLEvent... eventsToWaitFor) throws CLBuildException { if ((mulMatDouble_kernel == null)) mulMatDouble_kernel = createKernel("mulMatDouble"); mulMatDouble_kernel.setArgs(a, aColumns, b, bColumns, c); return mulMatDouble_kernel.enqueueNDRange(commandQueue, globalWorkSizes, localWorkSizes, eventsToWaitFor); } CLKernel mulVecDouble_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 ); }
public LinearAlgebraUtils(CLQueue queue) throws IOException, CLBuildException { this.queue = queue; kernels = new LinearAlgebraKernels(queue.getContext()); }
public synchronized CLEvent multiplyDoubles( CLBuffer<Double> a, int aRows, int aColumns, CLBuffer<Double> b, int bRows, int bColumns, CLBuffer<Double> out, //long outRows, long outColumns, CLEvent... eventsToWaitFor) throws CLBuildException { if (a == null || b == null || out == null) throw new IllegalArgumentException("Null matrix"); if (aColumns != bRows || out.getElementCount() != (aRows * bColumns)) throw new IllegalArgumentException("Invalid matrix sizes : multiplying matrices of sizes (A, B) and (B, C) requires output of size (A, C)"); long outRows = aRows; long outColumns = bColumns; return kernels.mulMatDouble(queue, a, (int)aColumns, b, (int)bColumns, out, new int[] { (int)outRows, (int)outColumns }, null, eventsToWaitFor ); } public synchronized CLEvent multiplyFloats(
public synchronized CLEvent transposeFloat(CLQueue commandQueue, CLBuffer<Float > a, int aRows, int aColumns, CLBuffer<Float > out, int globalWorkSizes[], int localWorkSizes[], CLEvent... eventsToWaitFor) throws CLBuildException { if ((transposeFloat_kernel == null)) transposeFloat_kernel = createKernel("transposeFloat"); transposeFloat_kernel.setArgs(a, aRows, aColumns, out); return transposeFloat_kernel.enqueueNDRange(commandQueue, globalWorkSizes, localWorkSizes, 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 LinearAlgebraUtils(CLQueue queue) throws IOException, CLBuildException { this.queue = queue; kernels = new LinearAlgebraKernels(queue.getContext()); }
public synchronized CLEvent multiplyDoubles( CLBuffer<Double> a, int aRows, int aColumns, CLBuffer<Double> b, int bRows, int bColumns, CLBuffer<Double> out, //long outRows, long outColumns, CLEvent... eventsToWaitFor) throws CLBuildException { if (a == null || b == null || out == null) throw new IllegalArgumentException("Null matrix"); if (aColumns != bRows || out.getElementCount() != (aRows * bColumns)) throw new IllegalArgumentException("Invalid matrix sizes : multiplying matrices of sizes (A, B) and (B, C) requires output of size (A, C)"); long outRows = aRows; long outColumns = bColumns; return kernels.mulMatDouble(queue, a, (int)aColumns, b, (int)bColumns, out, new int[] { (int)outRows, (int)outColumns }, null, eventsToWaitFor ); } public synchronized CLEvent multiplyFloats(
public synchronized CLEvent mulMatFloat(CLQueue commandQueue, CLBuffer<Float > a, int aColumns, CLBuffer<Float > b, int bColumns, CLBuffer<Float > c, int globalWorkSizes[], int localWorkSizes[], CLEvent... eventsToWaitFor) throws CLBuildException { if ((mulMatFloat_kernel == null)) mulMatFloat_kernel = createKernel("mulMatFloat"); mulMatFloat_kernel.setArgs(a, aColumns, b, bColumns, c); return mulMatFloat_kernel.enqueueNDRange(commandQueue, globalWorkSizes, localWorkSizes, eventsToWaitFor); } CLKernel mulVecFloat_kernel;
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 LinearAlgebraKernels(CLProgram program) throws IOException { super(program, readRawSourceForClass(LinearAlgebraKernels.class)); } CLKernel mulMatDouble_kernel;
public synchronized CLEvent multiplyFloats( CLBuffer<Float> a, long aRows, long aColumns, CLBuffer<Float> b, long bRows, long bColumns, CLBuffer<Float> out, //long outRows, long outColumns, CLEvent... eventsToWaitFor) throws CLBuildException { long outRows = aRows; long outColumns = bColumns; return kernels.mulMatFloat(queue, a, (int)aColumns, b, (int)bColumns, out, new int[] { (int)outRows, (int)outColumns }, null, eventsToWaitFor ); } Reductor<Double> addReductorDouble;
public synchronized CLEvent mulVecDouble(CLQueue commandQueue, CLBuffer<Double > a, int aColumns, CLBuffer<Double > b, int bSize, CLBuffer<Double > c, int globalWorkSizes[], int localWorkSizes[], CLEvent... eventsToWaitFor) throws CLBuildException { if ((mulVecDouble_kernel == null)) mulVecDouble_kernel = createKernel("mulVecDouble"); mulVecDouble_kernel.setArgs(a, aColumns, b, bSize, c); return mulVecDouble_kernel.enqueueNDRange(commandQueue, globalWorkSizes, localWorkSizes, eventsToWaitFor); } CLKernel transposeDouble_kernel;
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 LinearAlgebraKernels(CLProgram program) throws IOException { super(program, readRawSourceForClass(LinearAlgebraKernels.class)); } CLKernel mulMatDouble_kernel;
public synchronized CLEvent transposeFloat(CLQueue commandQueue, CLBuffer<Float > a, int aRows, int aColumns, CLBuffer<Float > out, int globalWorkSizes[], int localWorkSizes[], CLEvent... eventsToWaitFor) throws CLBuildException { if ((transposeFloat_kernel == null)) transposeFloat_kernel = createKernel("transposeFloat"); transposeFloat_kernel.setArgs(a, aRows, aColumns, out); return transposeFloat_kernel.enqueueNDRange(commandQueue, globalWorkSizes, localWorkSizes, eventsToWaitFor); } }
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 ); }