1.23
2.0
acw/focus-triggers
main
test-branch
| Line | |
|---|
| 1 | After a sudden realization, I find that I need almost none of the openCL stuff
|
|---|
| 2 | The programs can be broken into these very simple parts:
|
|---|
| 3 | 1. Get the number of devices, give them ids
|
|---|
| 4 | Related to clGetDevices
|
|---|
| 5 | 2. Prepare to make threads threads using device ids as "ranks"
|
|---|
| 6 | based either on array index or their device id
|
|---|
| 7 | Give them variables from __global or __local, remember that local is default
|
|---|
| 8 | global means that each one gets from a pointer to the same variable
|
|---|
| 9 | Use the kernel text for the above
|
|---|
| 10 | *
|
|---|
| 11 |
|
|---|
| 12 | 3. Get the paramater inputs from what would be from clSetKernelArg, possibly clEnqueueWriteBuffer
|
|---|
| 13 |
|
|---|
| 14 | 4. Spawn processes in the same order as clEnqueueNDRangeKernel
|
|---|
| 15 | Stick data in the arrays
|
|---|
| 16 |
|
|---|
| 17 | 5. Store output somewhere else
|
|---|
| 18 | May come from arrays
|
|---|
| 19 |
|
|---|
| 20 | 6. Possibly free
|
|---|
| 21 |
|
|---|
| 22 | Considerations:
|
|---|
| 23 | Make a struct for the array that holds:
|
|---|
| 24 | Rank
|
|---|
| 25 | Any variables that go in |
|---|
Note:
See
TracBrowser
for help on using the repository browser.