summaryrefslogtreecommitdiffstats
path: root/test/com/jogamp/opencl/CLProgramTest.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-07-12 01:49:31 +0200
committerSven Gothel <[email protected]>2023-07-12 01:49:31 +0200
commit791eb1b2ae3001f04d59a61f634161e21d96ef6d (patch)
tree24be59b1a6bcbbec4e09c972d461ae2fe69078b9 /test/com/jogamp/opencl/CLProgramTest.java
parentdc1424050e47cd239ad26c4f12fb3a0e4289d682 (diff)
parent2ad07a7e3e8cf1fc29fe7cbb3256c4c2cda27d02 (diff)
Merge remote-tracking branch 'wwalker/master'v2.5.0
Diffstat (limited to 'test/com/jogamp/opencl/CLProgramTest.java')
-rw-r--r--test/com/jogamp/opencl/CLProgramTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/com/jogamp/opencl/CLProgramTest.java b/test/com/jogamp/opencl/CLProgramTest.java
index ae09d2cb..8310ad06 100644
--- a/test/com/jogamp/opencl/CLProgramTest.java
+++ b/test/com/jogamp/opencl/CLProgramTest.java
@@ -31,6 +31,7 @@ package com.jogamp.opencl;
import com.jogamp.opencl.test.util.UITestCase;
import com.jogamp.opencl.util.CLBuildConfiguration;
import com.jogamp.opencl.util.CLProgramConfiguration;
+import com.jogamp.common.nio.Buffers;
import com.jogamp.opencl.CLProgram.Status;
import com.jogamp.opencl.util.CLBuildListener;
import com.jogamp.opencl.llb.CL;
@@ -41,6 +42,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
+import java.nio.ByteBuffer;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
@@ -52,7 +54,11 @@ import org.junit.runners.MethodSorters;
import static org.junit.Assert.*;
import static java.lang.System.*;
+import static com.jogamp.common.os.Platform.is32Bit;
+import static com.jogamp.opencl.CLException.newException;
import static com.jogamp.opencl.CLProgram.CompilerOptions.*;
+import static com.jogamp.opencl.llb.CL12.CL_KERNEL_GLOBAL_WORK_SIZE;
+import static com.jogamp.opencl.llb.CL.CL_SUCCESS;
/**
*
@@ -370,6 +376,30 @@ public class CLProgramTest extends UITestCase {
}
+ /**
+ * Test of getting new kernel work group information, including those from OpenCL versions newer than 1.1.
+ */
+ @Test
+ public void test22KerneWorkGrouplInfo() {
+ final CLContext context = CLContext.create();
+
+ try{
+ final CLProgram program = context.createProgram(test20KernelSource).build();
+ assertTrue(program.isExecutable());
+
+ final CLKernel kernel = program.createCLKernel("foo");
+ assertNotNull(kernel);
+
+ final long pwgsm = kernel.getPreferredWorkGroupSizeMultiple(context.getDevices()[0]);
+ out.println("preferred workgroup size multiple: " + pwgsm);
+
+ final long pms = kernel.getPrivateMemSize(context.getDevices()[0]);
+ out.println("private mem size: " + pms);
+ }finally{
+ context.release();
+ }
+ }
+
// @Test
public void test60Load() throws IOException, ClassNotFoundException, InterruptedException {
for(int i = 0; i < 100; i++) {