source:
CIVL/examples/translation/openclversion2.1/openCLshared.cvl@
7317e9f
| Last change on this file since 7317e9f was b93a874, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 483 bytes | |
| Rev | Line | |
|---|---|---|
| [4686c50] | 1 | #include "cl.cvl" |
| 2 | #include <stdio.h> | |
| 3 | #include <stdlib.h> | |
| 4 | #include <string.h> | |
| 5 | ||
| [1e4e5da] | 6 | int clGetDeviceIDs(int numEntries, cl_device_id * devices) |
| [863d90b] | 7 | { |
| [1e4e5da] | 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; | |
| [863d90b] | 13 | } |
| [4686c50] | 14 | |
| [141e866] | 15 | cl_command_queue clCreateCommandQueue(cl_device_id devices) |
| 16 | { | |
| 17 | cl_command_queue queue; | |
| 18 | ||
| 19 | queue.device = devices; | |
| 20 | ||
| 21 | return queue; | |
| 22 | } | |
| [d508f18] | 23 | //would pick the kernel by name, but not currently in place |
| [141e866] | 24 | |
| 25 | ||
| 26 | ||
| 27 | ||
| 28 | ||
| 29 | ||
| 30 | ||
| 31 |
Note:
See TracBrowser
for help on using the repository browser.
