<?xml version="1.0" encoding='utf-8'?>
<!-- 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
-->
<?xml-stylesheet type="text/xsl" href="https://mbien.dev/roller-ui/styles/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom">
    <title type="html">Michael Bien&apos;s Weblog</title>
    <subtitle type="html">don&apos;t panic</subtitle>
    <id>https://mbien.dev/blog/feed/entries/atom</id>
        <link rel="self" type="application/atom+xml" href="https://mbien.dev/blog/feed/entries/atom?tags=opencl" />
    <link rel="alternate" type="text/html" href="https://mbien.dev/blog/" />
    <updated>2024-08-24T07:57:58+00:00</updated>
    <generator uri="http://roller.apache.org" version="6.1.4">Apache Roller</generator>
    <entry>
        <id>https://mbien.dev/blog/entry/netbeans_opencl_pack</id>
        <title type="html">NetBeans OpenCL Pack</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/netbeans_opencl_pack"/>
        <published>2011-08-30T02:16:02+00:00</published>
        <updated>2020-08-01T08:43:44+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jocl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opencl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
Since I am doing a lot with OpenCL lately I decided to try to improve the tooling around OpenCL a bit. A weekend later the NetBeans OpenCL Pack was born :).
&lt;/p&gt;

&lt;h3&gt;Features Including:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;OpenCL Editor with syntax highlighting code completion and CL reference pages integration&lt;/li&gt;
&lt;li&gt;OpenCL compiler integration&lt;/li&gt;
&lt;li&gt;In-editor annotations of compiler warnings and errors updated as you type&lt;/li&gt;
&lt;li&gt;JOCL project template&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Technical Details:&lt;/h3&gt;
&lt;p&gt;
The editor uses ANTLR as parser and lexer. This allows such simple things like keyword highlighting and also more complex features like semantic highlighting, formatting and auto completion (formatting is not yet implemented). It can also detect and report syntax errors, however this feature is automatically disabled if an OpenCL compiler is present on the host system. All with help of JOCL detected &lt;a href=&quot;//mbien.dev/blog/entry/developing_with_jocl_on_amd&quot;&gt;OpenCL implementations&lt;/a&gt; can be used as compiler backend.
&lt;/p&gt;
&lt;p&gt;
Instead of using the old OpenGL Pack as template I decided to write it from scratch using latest NetBeans 7 and Java 7 APIs. So you will have to start NB with JDK7 to be able to use it.
&lt;/p&gt;
&lt;h3&gt;Download&lt;/h3&gt;
&lt;p&gt;
you can download it from the NetBeans &lt;a href=&quot;http://plugins.netbeans.org/plugin/39980/?show=true&quot;&gt;plugin portal&lt;/a&gt;
 [&lt;a href=&quot;https://github.com/mbien/netbeans-opencl-pack/downloads&quot;&gt;mirror&lt;/a&gt;], sourcecode is on &lt;a href=&quot;https://github.com/mbien/netbeans-opencl-pack&quot;&gt;github&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
feedback and/or contributions/bugreports are as always appreciated
&lt;/p&gt;
&lt;h3&gt;Screenshots:&lt;/h3&gt;
&lt;img src=&quot;https://lh5.googleusercontent.com/-DuJOgPf6ntA/TlwDOi5edBI/AAAAAAAAAIc/ptvPNatMwMU/cl-completion.png&quot; alt=&quot;auto completion&quot;/&gt;
&lt;img src=&quot;https://lh3.googleusercontent.com/SamaXSwwQCQHCzXjz7iZsqkvIGriiGpDfqOF86E17kfq73tOIDcADKEakVk0uK1WLdDe4Sc1xucEeft2G63uDVEmMikXxWZ6MY_FA96RvRu4OYIY2QKUG4jx4--t8hNSIpYcbvOvhxA_9x4kVCwIa1yR_CuRZq-qBknPPuBAa_JqG3jUG2vStXhrgBOpMJE9ITx6yciXcAclP4QUHBh4DsXeH-FTP5qT4G3UhsPrloxmPIOeCXam1YGmydpgOdpaP9iC-HDIBQHJwEdF7H6Bn838XhAB8z2q4hdTbQPG8ZLl91nWKlgwIYZtRadJ0gtJ7_K4m2dk1bFvQM4-sQRxryjz6acualS3EMms8Nxyc5mmeUQafu9FLuzWTvlbkaWMNyV04x3E9jjKCfpYJ5N3dJfZbnPNoXJlXnXBMQfCMh8tby5BOXfIHVgnCsCMDEkpGGvbZ5nvE51VZmZUvntxlA5WyiSchRnOqWamcsZ1hAQlkaFL_ctsTNOZStq8J4vsP6ywE8x5uSnQ71wIgpWvFYHC0IMF19QSixrt1wwZosd0j_toU20hdQ9T1OmAWznmRgQIt_dWw79mC1B4SxLXJ3nDZ9USbr0mOLxs7LO5MDuzE71EACGXY1N_wH9pwtcjBP2i1NkGM2q1jRynalZfoX8oFR7g10A=w815-h604-no&quot; width=&quot;750&quot; height=&quot;556&quot; alt=&quot;editor&quot;/&gt;
&lt;img src=&quot;https://lh3.googleusercontent.com/-JdGJHriqOYI/TlwDO9j7xBI/AAAAAAAAAIg/AJnl47x7X2k/jocl-project.png&quot; alt=&quot;project templates&quot;/&gt;

&lt;p&gt;
have fun!
&lt;/p&gt;
</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/many_little_improvements_made_it</id>
        <title type="html">Many little improvements made it into JOCL recently</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/many_little_improvements_made_it"/>
        <published>2011-08-05T00:24:59+00:00</published>
        <updated>2020-04-09T09:50:29+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jocl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opencl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
Ok some of them are big, but I will only cover the little things with this blog entry :).
&lt;/p&gt;

&lt;h3&gt;CLKernel&lt;/h3&gt;
&lt;p&gt;
I added multiple utility methods to CLKernel and related classes. It is for example now possible to create a kernel and set its arguments in one line. 
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
CLKernel sha512 = program.createCLKernel(&quot;sha512&quot;, padBuffer, digestBuffer, rangeBuffer);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Thanks to feedback in the jocl forums I also added methods to set vector typed arguments directly. In past you could do this only by setting them via a java.util.Buffer.
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
kernel.setArg(index, x, y, z, w);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Another small feature of CLKernel is to enforce 32bit arguments. You may want to switch between single and double floatingpoint precision at runtime or mix between both to improve performance you will have to compile the program with the double FP extension enabled. By setting kernel.setForce32bitArgs(true) all java doubles used as kernel arguments will be automatically cast down to 32bit CL floats (see MultiDeviceFractal demo for a example). This is nothing special but might safe you several if(single){setArg((float)foo)}else{setArg(foo)} constructs.
&lt;/p&gt;

&lt;h3&gt;CLWork&lt;/h3&gt;
&lt;p&gt;
CLKernel still only represents the function in the OpenCL program you want to call - nothing more. The new CLWork object contains everything required for kernel execution, like the NDRange and the kernel itself.
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
    int size = buffer.getNIOCapacity();
    CLWork1D work = CLWork.create1D(program.createCLKernel(&quot;sum&quot;, buffer, size));
    work.setWorkSize(size, 1).optimizeFor(device);

    // execute
    queue.putWriteBuffer(buffer, false)
         .putWork(work)
         .putReadBuffer(buffer, true);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
optimizeFor(device) adjusts the workgroup size to meet device specific recommended values. This should make sure that all computing units of your GPU are used by dividing the work into groups (however this only works if your task does not care about the workgroup size, see javadoc).
&lt;/p&gt;

&lt;h3&gt;CLSubDevice&lt;/h3&gt;
&lt;p&gt;
Sometimes you don&apos;t want to put your CLDevice under 100% load. This might be the case for example if your device is the CPU your application is running on or if you have to share the GPU with an OpenGL context for rendering. One easy way of controlling device load is to limit the amount of compute units used for a task.
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
    CLPlatform platform = CLPlatform.getDefault(version(CL_1_1), type(CPU));

    CLDevice devices = platform.getMaxFLOPSDevice(type(CPU));
    CLSubDevice[] subs = device.createSubDevicesByCount(4, 4);
    // array contains now two virtual devices containing four CPU cores each

    CLContext context = CLContext.create(subs);
    CLCommandQueue queue = subs[0].createCommandQueue();
    ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
CLSubDevices extends CLDevice and can be used for context creation, queue creation and everywhere you would use the CLDevice. Prior to creating subdevices you should check if device.isFissionSupported() returns true.
&lt;/p&gt;


&lt;h3&gt;CLProgram builder&lt;/h3&gt;
&lt;p&gt;
Ok, this utility is not that new but I haven&apos;t blogged about it yet. If program.build() isn&apos;t enough you should take a look at the program builder.
CLBuildConfiguration stores everything which is needed for program compilation and is easily configurable via the builder pattern :).
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
        // reusable builder
        CLBuildConfiguration builder = CLProgramBuilder.createConfiguration()
                                     .withOption(ENABLE_MAD)
                                     .forDevices(context.getDevices())
                                     .withDefine(&quot;RADIUS&quot;, 5)
                                     .withDefine(&quot;ENABLE_FOOBAR&quot;);
        builder.build(programA);
        builder.build(programB);
        ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
CLBuildConfiguration is fully reusable and can be upgraded to CLProgramConfiguration if you combine it with a CLProgram. Both can be serialised which allows to store the build configuration or the entire prebuild program on disc or send it over the network. (caching binaries on disc can safe startup time for example)
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
        // program configuration
        ois = new ObjectInputStream(new FileInputStream(file));
        CLProgramConfiguration programConfig = CLProgramBuilder.loadConfiguration(ois, context);
        assertNotNull(programConfig.getProgram());
        ois.close();
        program = programConfig.build(); // builds from source or loads binaries if possible
        assertTrue(program.isExecutable());
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Note: loading binaries and associating them with the right driver/device is currently not trivial with OpenCL. Even if everything works as intended it is still possible that the driver refuses the binaries for some reason (driver update...etc). Thats why its recommended to add the program source to the configuration before calling build() to allow a automatic rebuild as fallback.
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
        // another entry point for complex builds (prepare() returns CLProgramConfiguration)
        program.prepare().withOption(ENABLE_MAD).forDevice(context.getMaxFlopsDevice()).build();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
(all snippets have been stolen from the junit tests)&lt;br/&gt;
I am sure I forgot something... but this should cover at least some of the incremental improvements. Expect a few more blog entries for the larger features soon.
&lt;/p&gt;

&lt;p&gt;
 - - - - - - &lt;br/&gt;
In other news: Nvidia released OpenCL 1.1 drivers, some of us thought this would never happen -&gt; all major vendors (AMD, Intel, NV, IBM, ZiiLABS ..) support now OpenCL 1.1 (&lt;a href=&quot;https://picasaweb.google.com/lh/photo/NraNQ0dsxwHqk_tzmozDJg&quot;&gt;screenshot&lt;/a&gt;)
&lt;/p&gt;
&lt;p&gt;
have fun!
&lt;/p&gt;
</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/developing_with_jocl_on_amd</id>
        <title type="html">Developing with JOCL on AMD, Intel and Nvidia OpenCL platforms</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/developing_with_jocl_on_amd"/>
        <published>2011-05-17T20:30:55+00:00</published>
        <updated>2011-05-17T21:10:29+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jocl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opencl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
One nice feature of OpenCL is that the platform abstraction was handled in the spec from the first day on. You can install all OpenCL drivers side by side and let the application choose at runtime, on which device and on which platform it should execute the kernels.
&lt;/p&gt;
&lt;p&gt;
As of today there are &lt;del&gt;three&lt;/del&gt; four vendors which provide OpenCL implementations for the desktop. AMD and Intel support the OpenCL 1.1 specification where Nvidia apparently tries to stick with 1.0 to encourage their customers to stick with CUDA ;-). [edit] And of course there is also Apple providing out-of-the box OpenCL 1.0 support in MacOS 10.6.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://jogamp.org/jocl/www/&quot;&gt;JOCL&lt;/a&gt; contains a small &lt;a href=&quot;http://jogamp.org/deployment/webstart-next/jocl-demos/clinfo.jnlp&quot;&gt;CLInfo&lt;/a&gt; utility which can be used to quickly verify OpenCL installations. Here is the output on my system (ubuntu was booted) having all three SDKs installed:
&lt;/p&gt;

&lt;div style=&quot;overflow:auto; height:400px;&quot;&gt;
&lt;table border=&quot;1&quot;&gt;&lt;tr&gt;&lt;td&gt;CL_PLATFORM_NAME&lt;/td&gt;&lt;th colspan=&quot;1&quot;&gt;ATI Stream&lt;/th&gt;&lt;th colspan=&quot;2&quot;&gt;NVIDIA CUDA&lt;/th&gt;&lt;th colspan=&quot;1&quot;&gt;Intel(R) OpenCL&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_PLATFORM_VERSION&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;OpenCL 1.1 ATI-Stream-v2.2 (302)&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;OpenCL 1.0 CUDA 4.0.1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;OpenCL 1.1 LINUX&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_PLATFORM_PROFILE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;FULL_PROFILE&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;FULL_PROFILE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;FULL_PROFILE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_PLATFORM_VENDOR&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;Advanced Micro Devices, Inc.&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;NVIDIA Corporation&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;Intel(R) Corporation&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_PLATFORM_ICD_SUFFIX_KHR&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;AMD&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;NV&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;Intel&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_PLATFORM_EXTENSIONS&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[cl_khr_icd, cl_amd_event_callback]&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;[cl_khr_icd, cl_khr_byte_addressable_store, cl_nv_compiler_options, cl_nv_pragma_unroll, cl_nv_device_attribute_query, cl_khr_gl_sharing]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[cl_khr_icd, cl_khr_byte_addressable_store, cl_khr_fp64, cl_khr_local_int32_extended_atomics, cl_khr_local_int32_base_atomics, cl_khr_global_int32_base_atomics, cl_khr_gl_sharing, cl_intel_printf, cl_khr_global_int32_extended_atomics, cl_ext_device_fission]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_NAME&lt;/td&gt;&lt;th colspan=&quot;1&quot;&gt;Intel(R) Core(TM) i7 CPU         940  @ 2.93GHz&lt;/th&gt;&lt;th colspan=&quot;1&quot;&gt;GeForce GTX 295&lt;/th&gt;&lt;th colspan=&quot;1&quot;&gt;GeForce GTX 295&lt;/th&gt;&lt;th colspan=&quot;1&quot;&gt;Intel(R) Core(TM) i7 CPU         940  @ 2.93GHz&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_TYPE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;CPU&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;GPU&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;GPU&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;CPU&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_AVAILABLE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_VERSION&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;OpenCL 1.1 ATI-Stream-v2.2 (302)&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;OpenCL 1.0 CUDA&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;OpenCL 1.0 CUDA&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;OpenCL 1.1 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_PROFILE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;FULL_PROFILE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;FULL_PROFILE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;FULL_PROFILE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;FULL_PROFILE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_ENDIAN_LITTLE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_VENDOR&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;GenuineIntel&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;NVIDIA Corporation&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;NVIDIA Corporation&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;Intel(R) Corporation&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_EXTENSIONS&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[cl_amd_device_attribute_query, cl_khr_byte_addressable_store, cl_khr_int64_extended_atomics, cl_khr_local_int32_extended_atomics, cl_amd_fp64, cl_amd_printf, cl_khr_local_int32_base_atomics, cl_khr_int64_base_atomics, cl_khr_global_int32_base_atomics, cl_khr_gl_sharing, cl_khr_global_int32_extended_atomics, cl_ext_device_fission]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[cl_khr_icd, cl_khr_byte_addressable_store, cl_khr_fp64, cl_khr_local_int32_extended_atomics, cl_khr_local_int32_base_atomics, cl_nv_compiler_options, cl_nv_pragma_unroll, cl_nv_device_attribute_query, cl_khr_global_int32_base_atomics, cl_khr_gl_sharing, cl_khr_global_int32_extended_atomics]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[cl_khr_icd, cl_khr_byte_addressable_store, cl_khr_fp64, cl_khr_local_int32_extended_atomics, cl_khr_local_int32_base_atomics, cl_nv_compiler_options, cl_nv_pragma_unroll, cl_nv_device_attribute_query, cl_khr_global_int32_base_atomics, cl_khr_gl_sharing, cl_khr_global_int32_extended_atomics]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[cl_khr_byte_addressable_store, cl_khr_fp64, cl_khr_local_int32_extended_atomics, cl_khr_local_int32_base_atomics, cl_khr_global_int32_base_atomics, cl_khr_gl_sharing, cl_intel_printf, cl_khr_global_int32_extended_atomics, cl_ext_device_fission]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_COMPUTE_UNITS&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;30&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;30&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_CLOCK_FREQUENCY&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2934&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1242&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1242&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2930&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_VENDOR_ID&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4098&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4318&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4318&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;32902&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_OPENCL_C_VERSION&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;OpenCL C 1.1 &lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info string [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info string [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;OpenCL C 1.1 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DRIVER_VERSION&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2.0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;270.41.06&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;270.41.06&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1.1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_ADDRESS_BITS&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;64&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;32&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;32&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;64&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;16&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;16&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;16&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;16&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_NATIVE_VECTOR_WIDTH_INT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_WORK_GROUP_SIZE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1024&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;512&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;512&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1024&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;3&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;3&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;3&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_WORK_ITEM_SIZES&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[1024, 1024, 1024]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[512, 512, 64]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[512, 512, 64]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[1024, 1024, 1024]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_PARAMETER_SIZE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4096&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4352&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4352&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1024&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_MEM_ALLOC_SIZE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1073741824&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;234831872&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;234700800&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;3154703360&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_GLOBAL_MEM_SIZE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;3221225472&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;939327488&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;938803200&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;12618813440&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_LOCAL_MEM_SIZE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;32768&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;16384&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;16384&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;32768&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_HOST_UNIFIED_MEMORY&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info value [error: CL_INVALID_VALUE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;65536&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;65536&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;65536&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;131072&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;64&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;64&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_GLOBAL_MEM_CACHE_SIZE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;32768&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;262144&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_CONSTANT_ARGS&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;9&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;9&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;128&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_IMAGE_SUPPORT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_READ_IMAGE_ARGS&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;128&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;128&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;128&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_WRITE_IMAGE_ARGS&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;128&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_IMAGE2D_MAX_WIDTH&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4096&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;4096&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8192&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_IMAGE2D_MAX_HEIGHT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;32768&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;32768&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;8192&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_IMAGE3D_MAX_WIDTH&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2048&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2048&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2048&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_IMAGE3D_MAX_HEIGHT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2048&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2048&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2048&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_IMAGE3D_MAX_DEPTH&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2048&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2048&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;2048&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_MAX_SAMPLERS&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;0&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;16&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;16&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;128&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_PROFILING_TIMER_RESOLUTION&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1000&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;1000&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;340831&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_EXECUTION_CAPABILITIES&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[EXEC_KERNEL, EXEC_NATIVE_KERNEL]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[EXEC_KERNEL]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[EXEC_KERNEL]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[EXEC_KERNEL, EXEC_NATIVE_KERNEL]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_HALF_FP_CONFIG&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_SINGLE_FP_CONFIG&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[DENORM, INF_NAN, ROUND_TO_NEAREST, ROUND_TO_INF, ROUND_TO_ZERO]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[INF_NAN, ROUND_TO_NEAREST, ROUND_TO_INF, ROUND_TO_ZERO, FMA]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[INF_NAN, ROUND_TO_NEAREST, ROUND_TO_INF, ROUND_TO_ZERO, FMA]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[DENORM, INF_NAN, ROUND_TO_NEAREST]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_DOUBLE_FP_CONFIG&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[DENORM, INF_NAN, ROUND_TO_NEAREST, ROUND_TO_INF, ROUND_TO_ZERO, FMA]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[DENORM, INF_NAN, ROUND_TO_NEAREST, ROUND_TO_INF, ROUND_TO_ZERO, FMA]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[DENORM, INF_NAN, ROUND_TO_NEAREST, ROUND_TO_INF, ROUND_TO_ZERO, FMA]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_LOCAL_MEM_TYPE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;GLOBAL&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;LOCAL&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;LOCAL&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;GLOBAL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_GLOBAL_MEM_CACHE_TYPE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;READ_WRITE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;NONE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;NONE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;READ_WRITE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_QUEUE_PROPERTIES&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[PROFILING_MODE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[OUT_OF_ORDER_MODE, PROFILING_MODE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[OUT_OF_ORDER_MODE, PROFILING_MODE]&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;[OUT_OF_ORDER_MODE, PROFILING_MODE]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_COMPILER_AVAILABLE&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CL_DEVICE_ERROR_CORRECTION_SUPPORT&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;cl_khr_fp16&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;cl_khr_fp64&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;false&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;cl_khr_gl_sharing | cl_APPLE_gl_sharing&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;td colspan=&quot;1&quot;&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;
The CLInfo utility is part of the &lt;a href=&quot;http://jogamp.org/jocl-demos/www/&quot;&gt;jocl-demos&lt;/a&gt; project and is also available via webstart. For a plain text version of the above output you can run: 
&lt;/p&gt;
&lt;pre&gt;
 java -jar jocl.jar:gluegen-rt.jar\
    -Djava.library.path=&quot;path/to/jocl/libs:path/to/gluegen/libs&quot; com.jogamp.opencl.util.CLInfo
&lt;/pre&gt;
&lt;p&gt;
(btw to install the intel sdk on debian based systems follow this &lt;a href=&quot;http://mhr3.blogspot.com/2011/05/opencl-on-ubuntu.html&quot;&gt;link&lt;/a&gt;)
&lt;/p&gt;
&lt;p&gt;
happy coding!
&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/java_binding_for_the_opencl</id>
        <title type="html">Java Binding for the OpenCL API </title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/java_binding_for_the_opencl"/>
        <published>2010-09-10T22:49:42+00:00</published>
        <updated>2020-04-09T09:54:27+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jocl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogamp" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opencl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
I am currently working on Java Binding for the &lt;a href=&quot;http://en.wikipedia.org/wiki/Opencl&quot;&gt;OpenCL&lt;/a&gt; API using &lt;a href=&quot;https://jogamp.org/gluegen/www/&quot;&gt;GlueGen&lt;/a&gt; (as used in &lt;a href=&quot;https://jogl.jogamp.org&quot;&gt;JOGL&lt;/a&gt;, &lt;a href=&quot;https://joal.jogamp.org&quot;&gt;JOAL&lt;/a&gt;). The project started as part of my bachelor of CS thesis short after the release of the first OpenCL specification draft and is now fully feature complete with OpenCL 1.1. &lt;a href=&quot;https://jogamp.org/jocl/www/&quot;&gt;JOCL&lt;/a&gt; is currently in the stabilization phase, a beta release shouldn&apos;t be far away.
&lt;/p&gt;

&lt;h3&gt;Overview - How does it work?&lt;/h3&gt;
JOCL enables applications running on the JVM to use OpenCL for massively parallel, high performance computing tasks, executed on heterogeneous hardware (GPUs, CPUs, FPGAs etc) in a platform independent manner. JOCL consists of two parts, the low level and the high level binding.
&lt;p&gt;
The &lt;b&gt;low level bindings (LLB)&lt;/b&gt; are automatically generated using the official OpenCL &lt;a href=&quot;http://www.khronos.org/registry/cl/&quot;&gt;headers&lt;/a&gt; as input and provide a high performance, JNI based, 1:1 mapping to the C functions.
&lt;/p&gt;
&lt;p&gt;This has the following advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;reduces maintenance overhead and ensures spec conformance&lt;/li&gt;
&lt;li&gt;compiletime JNI bindings are the fastest way to access native libs from the JVM&lt;/li&gt;
&lt;li&gt;makes translating OpenCL C code into Java + JOCL very easy (e.g. from books or tutorials)&lt;/li&gt;
&lt;li&gt;flexibility and stability: OpenCL libs are loaded dynamically and accessed via function pointers&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;
The hand written &lt;b&gt;high level bindings (HLB)&lt;/b&gt; is build on top of LLB and hides most boilerplate code (like object IDs, pointers and resource management) behind easy to use java objects.
HLB use direct NIO buffers internally for fast memory transfers between the JVM and the OpenCL implementation and is very GC friendly. Most of the API is designed for method chaining but of course you don&apos;t have to use it this way if you don&apos;t want to. JOCL also seamlessly integrates with JOGL 2 (both are built and tested together). Just pass the JOGL context as parameter to the JOCL context factory and you will receive a shared context. If you already know OpenCL and Java, HLB should be very intuitive for you.
&lt;/p&gt;
&lt;p&gt;
The project is available on &lt;a href=&quot;https://jocl.jogamp.org&quot;&gt;jogamp.org&lt;/a&gt;. Please use the &lt;a href=&quot;https://jogamp.org/forum.html&quot;&gt;mailinglist / forum&lt;/a&gt; for feedback or questions and the &lt;a href=&quot;https://jogamp.org/bugzilla/&quot;&gt;bugtracker&lt;/a&gt; if you experience any issues.
The JOCL &lt;a href=&quot;http://github.com/mbien/jocl&quot;&gt;root repository&lt;/a&gt; is located on github, you may also want to take a look at the &lt;a href=&quot;http://github.com/mbien/jocl-demos&quot;&gt;jocl-demos&lt;/a&gt; project. (If the demos are not enough you might also want to take a look at the junit tests)
&lt;/p&gt;

&lt;h3&gt;Screenshots (sourcecode in jocl-demos project):&lt;/h3&gt;
&lt;a href=&quot;https://jogamp.org/jocl/www/Julia3d.png&quot;&gt;
&lt;img src=&quot;https://jogamp.org/jocl/www/Julia3d_sm.png&quot; width=&quot;400&quot; height=&quot;300&quot; alt=&quot;JOCL Julia Set&quot;/&gt;
&lt;/a&gt;
&lt;img src=&quot;https://jogamp.org/jocl/www/mandelbrot64_sm.png&quot; width=&quot;256&quot; height=&quot;256&quot; alt=&quot;high precision&quot;/&gt;


&lt;p&gt;
More regarding OpenGL interoperability and other features in upcoming blog entries.
&lt;/p&gt;
&lt;p&gt;
The following sample shows basic setup, computation and cleanup using the high level APIs.
&lt;/p&gt;
&lt;h3&gt;Hello World or parallel a+b=c&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
/**
 * Hello Java OpenCL example. Adds all elements of buffer A to buffer B
 * and stores the result in buffer C.
 * Sample was inspired by the Nvidia VectorAdd example written in C/C++
 * which is bundled in the Nvidia OpenCL SDK.
 * @author Michael Bien
 */
public class HelloJOCL {

    public static void main(String[] args) throws IOException {
        // Length of arrays to process (arbitrary number)
        int elementCount = 11444777;
        // Local work size dimensions
        int localWorkSize = 256;
        // rounded up to the nearest multiple of the localWorkSize
        int globalWorkSize = roundUp(localWorkSize, elementCount);

        // setup
        CLContext context = CLContext.create();

        CLProgram program = context.createProgram(
                       HelloJOCL.class.getResourceAsStream(&quot;VectorAdd.cl&quot;)
                                 ).build();

        CLBuffer&amp;lt;FloatBuffer&amp;gt; clBufferA =
                       context.createFloatBuffer(globalWorkSize, READ_ONLY);
        CLBuffer&amp;lt;FloatBuffer&amp;gt; clBufferB =
                       context.createFloatBuffer(globalWorkSize, READ_ONLY);
        CLBuffer&amp;lt;FloatBuffer&amp;gt; clBufferC =
                       context.createFloatBuffer(globalWorkSize, WRITE_ONLY);

        out.println(&quot;used device memory: &quot;
            + (clBufferA.getSize()+clBufferB.getSize()+clBufferC.getSize())/1000000 +&quot;MB&quot;);

        // fill read buffers with random numbers (just to have test data).
        fillBuffer(clBufferA.getBuffer(), 12345);
        fillBuffer(clBufferB.getBuffer(), 67890);

        // get a reference to the kernel functon with the name &apos;VectorAdd&apos;
        // and map the buffers to its input parameters.
        CLKernel kernel = program.createCLKernel(&quot;VectorAdd&quot;);
        kernel.putArgs(clBufferA, clBufferB, clBufferC).putArg(elementCount);

        // create command queue on fastest device.
        CLCommandQueue queue = context.getMaxFlopsDevice().createCommandQueue();

        // asynchronous write to GPU device,
        // blocking read later to get the computed results back.
        long time = nanoTime();
        queue.putWriteBuffer(clBufferA, false)
             .putWriteBuffer(clBufferB, false)
             .put1DRangeKernel(kernel, 0, globalWorkSize, localWorkSize)
             .putReadBuffer(clBufferC, true);
        time = nanoTime() - time;

        // cleanup all resources associated with this context.
        context.release();

        // print first few elements of the resulting buffer to the console.
        out.println(&quot;a+b=c results snapshot: &quot;);
        for(int i = 0; i &amp;lt; 10; i++)
            out.print(clBufferC.getBuffer().get() + &quot;, &quot;);
        out.println(&quot;...; &quot; + clBufferC.getBuffer().remaining() + &quot; more&quot;);

        out.println(&quot;computation took: &quot;+(time/1000000)+&quot;ms&quot;);

    }

    private static final void fillBuffer(FloatBuffer buffer, int seed) {
        Random rnd = new Random(seed);
        while(buffer.remaining() != 0)
            buffer.put(rnd.nextFloat()*100);
        buffer.rewind();
    }

    private static final int roundUp(int groupSize, int globalSize) {
        int r = globalSize % groupSize;
        if (r == 0) {
            return globalSize;
        } else {
            return globalSize + groupSize - r;
        }
    }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;VectorAdd.cl&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-opencl&quot;&gt;
    // OpenCL Kernel Function for element by element vector addition
    kernel void VectorAdd(global const float* a,
                          global const float* b,
                          global float* c, int numElements) {

        // get index into global data array
        int iGID = get_global_id(0);

        // bound check (equivalent to the limit on a &apos;for&apos; loop)
        if (iGID &amp;gt;= numElements)  {
            return;
        }

        // add the vector elements
        c[iGID] = a[iGID] + b[iGID];
    }
&lt;/code&gt;&lt;/pre&gt;
</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/jogamp_at_siggraph_2010</id>
        <title type="html">JogAmp at SIGGRAPH 2010</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/jogamp_at_siggraph_2010"/>
        <published>2010-05-23T21:17:07+00:00</published>
        <updated>2019-03-22T12:04:56+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="jocl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogamp" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opencl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opengl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;b&gt;The &lt;a href=&quot;http://jogamp.org/&quot;&gt;JogAmp&lt;/a&gt; team will be present at &lt;a href=&quot;http://www.siggraph.org/s2010&quot;&gt;SIGGRAPH&lt;/a&gt; this year:&lt;/b&gt;
&lt;pre&gt;
3D &amp; Multimedia Across Platforms and Devices Using JOGL
Tuesday, 27 July | 4:00 PM - 6:00 PM

This session discusses the features, contributions, and future of OpenGL, OpenCL, and OpenMax
across devices and OS exposed on top of Java using the JogAmp open-source libraries.
&lt;/pre&gt;
&lt;a href=&quot;http://www.siggraph.org/s2010/for_attendees/birds_feather&quot;&gt;link to Session&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;

hope to meet you there.&lt;br/&gt;&lt;br/&gt;

&lt;b&gt;about &lt;a href=&quot;http://jogamp.org/&quot;&gt;JogAmp&lt;/a&gt;.&lt;/b&gt;&lt;br/&gt;
&lt;i&gt;JogAmp is the home of high performance Java libraries for 3D Graphics, Multimedia and Processing.
JogAmp consists currently of the projects JOGL, JOCL and JOAL which provide cross platform language bindings to the OpenGL, OpenCL, OpenAL and OpenMAX APIs.&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;

&lt;iframe width=&quot;620&quot; height=&quot;348&quot; src=&quot;https://www.youtube-nocookie.com/embed/hTNfGZTnp3c&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;br/&gt;
- - - -
&lt;br/&gt;
(yes i know i should start bogging again :))&lt;br/&gt;&lt;br/&gt;</content>
    </entry>
</feed>

