Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Well, all libraries you've stated are simple wrappers for opencl native libraries. They pose relatively small amount of additional abstractions and are very close to general opencl functions. So if you are familiar with opencl in general you will get familiar with these libraries in no time.</p> <p>I think the 'OpenCL.NET' implementation is complete, it is free of anything that is not OpenCL. But after using it several times I've found it too low level.</p> <p>I've created my own wrapper it serves me good job by simplifying the host part dramatically here's the host part of one of my projects (if you are interested I can publish my OpenCl wrapper in github or any other svn service):</p> <pre><code>using System; using System.Net; using System.Collections.Generic; using System.IO; using Shared; using Shared.IO; using Shared.OpenCL; namespace Testing { public class ApplicationClass { static Random rand = new Random(); static Single[] RandomArray(Int32 length) { Single[] result = new Single[length]; for (int i = 0; i &lt; result.Length; i++) { result[i] = (Single)rand.NextDouble(); } return result; } static void Main(string[] args) { DeviceGlobalMemory output = new Byte[4096]; DeviceGlobalMemory indeces = RandomArray(102400); DeviceGlobalMemory ops = new Byte[3072]; DeviceGlobalMemory data = RandomArray(1048576); Console.Write("Creating kernel..."); Kernel kernel = Kernel.Create("Kernel", File.ReadAllText("Test.c"), data, indeces, ops, output); Console.Write("Executing kernel..."); Event e = kernel.Execute(256, 256); kernel.CommandQueue.Finish(); Console.WriteLine("done, operation took {0}", Profiler.DurationSeconds(e)); UnmanagedReader reader = new UnmanagedReader(new DeviceBufferStream(output)); for (int i = 0; i &lt; 256; i++) { if (i % 4 == 0) Console.WriteLine(); if (i % 16 == 0) Console.WriteLine(); Console.Write("{0}\t", reader.Read&lt;Single&gt;()); } } } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload