Intel Kernel Builder, Assigning Value to Buffers

Intel Kernel Builder, Assigning Value to Buffers


I just downloaded Intel OpenCL SDK 2013 beta and tried using the new Kernel Builder.
My question is how do you assign value to a buffer using a .csv file? What is the format?
It's easy to assign an image because the format is in .bmp and is an image file, but how
do you put buffer's values to a .csv table?


2 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Best Reply


The CSV file format is as follows:
Each line is one entry to the buffer. Inside each line, each column is a single element in the buffer's type, for example a float as part of a float4 entry.

So, for example, to represent a buffer of 2 float4 numbers your CSV can look like this:

Note that your CSV can have more columns and more lines than you'd use in your kernel, so you can create one CSV for multiple usages (float, float2, float3...float16) and with as many lines as you'd like, and when you create your kernel's argument limit its usage to your specific needs. For example, if you have 16 columns (for float16) and 1024 of such lines, but you need a float4 of 512 elements, you can use the same CSV, and your kernel will get the first 4 elements of each of the 512 lines only.

Oren Sarid

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi