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

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

nothing, actually

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

  • Property mode set to 100644
File size: 867 bytes
Line 
1#include "cl.cvl"
2#include <stdio.h>
3#include <stdlib.h>
4#include <string.h>
5
6/*
7 Inserts devices based on the number of entries, and unlike the openCL version, is the exact number not the maximum
8 int numEntries - Number of devices to be inputted
9 cl_device_id * devices- pointer to devices
10*/
11int clGetDeviceIDs(int numEntries, cl_device_id * devices)
12{
13 for (int i=0; i<numEntries; i++) {
14 devices[i].id = i;
15 // exactly equivalent to: (devices+i)->id = i
16 }
17 return CL_SUCCESS;
18}
19
20/*
21 Creates a command queue based off of the device inputted, must be called as many times as needed
22 cl_device_id devices - the device to be put into the queue
23*/
24cl_command_queue clCreateCommandQueue(cl_device_id devices)
25{
26 cl_command_queue queue;
27
28 queue.device = devices;
29
30 return queue;
31}
32//would pick the kernel by name, but not currently in place
33
34
35
36
Note: See TracBrowser for help on using the repository browser.