source:
CIVL/examples/translation/opencl/square.cvl@
3b13e9c8
| Last change on this file since 3b13e9c8 was 6267964, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 309 bytes | |
| Line | |
|---|---|
| 1 | #include <civlc.h> |
| 2 | #include <stdio.h> |
| 3 | #include "setup/openCL.cvl" |
| 4 | void main() |
| 5 | { |
| 6 | int err; |
| 7 | int num_entries = 3; |
| 8 | |
| 9 | cl_device_id device_id; |
| 10 | |
| 11 | err = clGetDeviceIDs(NULL, |
| 12 | CL_DEVICE_TYPE_GPU, |
| 13 | num_entries, |
| 14 | &device_id, |
| 15 | NULL); |
| 16 | printf("devices is %d", device_id[0]); |
| 17 | $assert (err == CL_SUCCESS); |
| 18 | } |
Note:
See TracBrowser
for help on using the repository browser.
