summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLKernel.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-10-22 13:03:53 +0200
committerMichael Bien <[email protected]>2009-10-22 13:03:53 +0200
commit503845224a820c0b9ce9204aa6215519f6b93c36 (patch)
treeb675747824468377685a4e6408a269b43b78c9f1 /src/com/mbien/opencl/CLKernel.java
parentb3881a0924ecbe17cf27cededeae8df40b2d6933 (diff)
32bit compatibility.
Diffstat (limited to 'src/com/mbien/opencl/CLKernel.java')
-rw-r--r--src/com/mbien/opencl/CLKernel.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/mbien/opencl/CLKernel.java b/src/com/mbien/opencl/CLKernel.java
index dcf00c9a..838f5969 100644
--- a/src/com/mbien/opencl/CLKernel.java
+++ b/src/com/mbien/opencl/CLKernel.java
@@ -1,6 +1,7 @@
package com.mbien.opencl;
import com.sun.gluegen.runtime.BufferFactory;
+import com.sun.gluegen.runtime.CPU;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -38,7 +39,7 @@ public class CLKernel {
}
public CLKernel setArg(int argumentIndex, CLBuffer value) {
- int ret = cl.clSetKernelArg(ID, argumentIndex, 8, wrap(value.ID));
+ int ret = cl.clSetKernelArg(ID, argumentIndex, CPU.is32Bit()?4:8, wrap(value.ID));
checkForError(ret, "error on clSetKernelArg");
return this;
}