source: CIVL/examples/translation/openclversion2.1/openCLshared.cvl@ 7317e9f

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 7317e9f was b93a874, checked in by Jacob Trieu <fuufusuu@…>, 12 years ago

closer to coding standards, documentation, TODO

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1261 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 483 bytes
Line 
1#include "cl.cvl"
2#include <stdio.h>
3#include <stdlib.h>
4#include <string.h>
5
6int clGetDeviceIDs(int numEntries, cl_device_id * devices)
7{
8 for (int i=0; i<numEntries; i++) {
9 devices[i].id = i;
10 // exactly equivalent to: (devices+i)->id = i
11 }
12 return CL_SUCCESS;
13}
14
15cl_command_queue clCreateCommandQueue(cl_device_id devices)
16{
17 cl_command_queue queue;
18
19 queue.device = devices;
20
21 return queue;
22}
23//would pick the kernel by name, but not currently in place
24
25
26
27
28
29
30
31
Note: See TracBrowser for help on using the repository browser.