diff options
author | Michael Bien <[email protected]> | 2010-01-02 00:15:55 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-01-02 00:15:55 +0100 |
commit | a5efe050242d1d6a45e03fcac1763ff90877e322 (patch) | |
tree | b8135791915083d1e36b383a182f2973927c8ead /test/com/mbien/opencl/LowLevelBindingTest.java | |
parent | 72203a5d1f8896463ded10d1b21ca116621d1900 (diff) |
introduced CLGLContext, refactored dependencies, cleanup in opencl code.
Diffstat (limited to 'test/com/mbien/opencl/LowLevelBindingTest.java')
-rw-r--r-- | test/com/mbien/opencl/LowLevelBindingTest.java | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/com/mbien/opencl/LowLevelBindingTest.java b/test/com/mbien/opencl/LowLevelBindingTest.java index 83e0ca45..0a600102 100644 --- a/test/com/mbien/opencl/LowLevelBindingTest.java +++ b/test/com/mbien/opencl/LowLevelBindingTest.java @@ -20,26 +20,26 @@ import static com.sun.gluegen.runtime.BufferFactory.*; public class LowLevelBindingTest { private final static String programSource = - " // OpenCL Kernel Function for element by element vector addition \n" - + "__kernel void VectorAdd(__global const int* a, __global const int* b, __global int* c, int iNumElements) { \n" - + " // get index into global data array \n" - + " int iGID = get_global_id(0); \n" - + " // bound check (equivalent to the limit on a 'for' loop for standard/serial C code \n" - + " if (iGID >= iNumElements) { \n" - + " return; \n" - + " } \n" - + " // add the vector elements \n" - + " c[iGID] = a[iGID] + b[iGID]; \n" - + "} \n" - + "__kernel void Test(__global const int* a, __global const int* b, __global int* c, int iNumElements) { \n" - + " // get index into global data array \n" - + " int iGID = get_global_id(0); \n" - + " // bound check (equivalent to the limit on a 'for' loop for standard/serial C code \n" - + " if (iGID >= iNumElements) { \n" - + " return; \n" - + " } \n" - + " c[iGID] = iGID; \n" - + "} \n"; + " // OpenCL Kernel Function for element by element vector addition \n" + + "kernel void VectorAdd(global const int* a, global const int* b, global int* c, int iNumElements) { \n" + + " // get index into global data array \n" + + " int iGID = get_global_id(0); \n" + + " // bound check (equivalent to the limit on a 'for' loop for standard/serial C code \n" + + " if (iGID >= iNumElements) { \n" + + " return; \n" + + " } \n" + + " // add the vector elements \n" + + " c[iGID] = a[iGID] + b[iGID]; \n" + + "} \n" + + "kernel void Test(global const int* a, global const int* b, global int* c, int iNumElements) { \n" + + " // get index into global data array \n" + + " int iGID = get_global_id(0); \n" + + " // bound check (equivalent to the limit on a 'for' loop for standard/serial C code \n" + + " if (iGID >= iNumElements) { \n" + + " return; \n" + + " } \n" + + " c[iGID] = iGID; \n" + + "} \n"; @BeforeClass |