diff options
author | Michael Bien <[email protected]> | 2010-01-18 15:24:29 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-01-18 15:24:29 +0100 |
commit | 09ac312a0645bd0d9adff580f29f20382dfbf8c9 (patch) | |
tree | 52e121e8c366c797f34008244243dd896cc1e88a /src/com/mbien/opencl/CLKernel.java | |
parent | c4aeea288271f57b3c8640a8cd4ba87d1c331814 (diff) |
introduced CLMemory as superclass for all memory objects.
added CLImage, CLImage2d and CLImage3d.
Diffstat (limited to 'src/com/mbien/opencl/CLKernel.java')
-rw-r--r-- | src/com/mbien/opencl/CLKernel.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/mbien/opencl/CLKernel.java b/src/com/mbien/opencl/CLKernel.java index 30ccc202..33d30730 100644 --- a/src/com/mbien/opencl/CLKernel.java +++ b/src/com/mbien/opencl/CLKernel.java @@ -58,7 +58,7 @@ public class CLKernel implements CLResource { } - public CLKernel putArg(CLBuffer<?> value) { + public CLKernel putArg(CLMemory<?> value) { setArg(argIndex++, value); return this; } @@ -83,13 +83,13 @@ public class CLKernel implements CLResource { return this; } - public CLKernel putArgs(CLBuffer<?>... values) { + public CLKernel putArgs(CLMemory<?>... values) { setArgs(argIndex, values); argIndex += values.length; return this; } - public CLKernel setArg(int argumentIndex, CLBuffer<?> value) { + public CLKernel setArg(int argumentIndex, CLMemory<?> value) { setArgument(argumentIndex, CPU.is32Bit()?4:8, wrap(value.ID)); return this; } @@ -114,12 +114,12 @@ public class CLKernel implements CLResource { return this; } - public CLKernel setArgs(CLBuffer<?>... values) { + public CLKernel setArgs(CLMemory<?>... values) { setArgs(0, values); return this; } - private final void setArgs(int startIndex, CLBuffer<?>... values) { + private final void setArgs(int startIndex, CLMemory<?>... values) { for (int i = 0; i < values.length; i++) { setArg(i+startIndex, values[i]); } |