Small fixes
[panamaz] / test-opencl-basic / opencl.api
index 3728ba6..eeb8308 100644 (file)
@@ -5,9 +5,17 @@ struct cl_image_format access=rwi {
 struct /^_cl/ access= rename=s/^_cl/cl/ {
 }
 
+
+# idea: dynamic will have a constructor that takes a SymbolLookup
+#       and ResourceScope
+#library CLExt dynamic {
+#              clIcdGetPlatformIDsKHR
+#}
+
 library CL {
        define:CLConstants
 
+       # core functions, resolved by dlopen
        clGetPlatformIDs
        clGetPlatformInfo
        clGetDeviceIDs
@@ -116,24 +124,34 @@ library CL {
        clCreateCommandQueue
        clCreateSampler
        clEnqueueTask
-
 }
 
+
 # base constants
 define CLConstants opencl.h {
        /.*/cl.h/             file-include
 }
 
+define CLPlatformConstants opencl.h {
+       /^CL_API_/                      exclude
+       CL_PROGRAM_STRING_DEBUG_INFO    exclude
+       /^__CL_/                        exclude
+       # huge/nan/infinity in c aren't compatible with java's string representation
+       CL_HUGE_VALF|CL_HUGE_VAL|CL_NAN|CL_INFINITY     exclude
+       /.*/cl_platform.h/              file-include
+
+}
+
 func clGetPlatformIDs {
-     num_entries     implied=Memory.size(platforms)
+     num_entries     implied=Memory.length(platforms)
 }
 
 func clGetDeviceIDs {
-     num_entries     implied=Memory.size(devices)
+     num_entries     implied=Memory.length(devices)
 }
 
 func clCreateContext {
-     num_devices     implied=Memory.size(devices)
+     num_devices     implied=Memory.length(devices)
      errcode_ret     result_code  success=CL_SUCCESS
 }