summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLKernel.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/mbien/opencl/CLKernel.java')
-rw-r--r--src/com/mbien/opencl/CLKernel.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/CLKernel.java b/src/com/mbien/opencl/CLKernel.java
index 21b176c7..a4ee9f89 100644
--- a/src/com/mbien/opencl/CLKernel.java
+++ b/src/com/mbien/opencl/CLKernel.java
@@ -68,10 +68,18 @@ public class CLKernel {
return this;
}
+ private final Buffer wrap(float value) {
+ return BufferFactory.newDirectByteBuffer(4).putFloat(value).rewind();
+ }
+
private final Buffer wrap(double value) {
return BufferFactory.newDirectByteBuffer(8).putDouble(value).rewind();
}
+ private final Buffer wrap(int value) {
+ return BufferFactory.newDirectByteBuffer(4).putInt(value).rewind();
+ }
+
private final Buffer wrap(long value) {
return BufferFactory.newDirectByteBuffer(8).putLong(value).rewind();
}