- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
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?
Thanks.
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?
Thanks.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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:
0.1,0.2,0.3,0.4
1.1,1.2,1.3,1.4
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
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:
0.1,0.2,0.3,0.4
1.1,1.2,1.3,1.4
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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:
0.1,0.2,0.3,0.4
1.1,1.2,1.3,1.4
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
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:
0.1,0.2,0.3,0.4
1.1,1.2,1.3,1.4
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

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page