1.23
2.0
acw/focus-triggers
main
test-branch
| 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 | */
|
|---|
| 11 | int 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 | */
|
|---|
| 24 | cl_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 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.