source: CIVL/examples/translation/openclversion2/README@ 764d472

1.23 2.0 main test-branch
Last change on this file since 764d472 was 1c47cb2, checked in by Jacob Trieu <fuufusuu@…>, 12 years ago

Slight changes to next example, planning for 2.1

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

  • Property mode set to 100644
File size: 1.6 KB
Line 
1After a sudden realization, I find that I need almost none of the openCL stuff
2The programs can be broken into these very simple parts:
31. Get the number of devices, give them ids
4 Related to clGetDevices
52. 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
123. Get the paramater inputs from what would be from clSetKernelArg, possibly clEnqueueWriteBuffer
13
144. Spawn processes in the same order as clEnqueueNDRangeKernel
15 Stick data in the arrays
16
175. Store output somewhere else
18 May come from arrays
19
206. Possibly free
21
22Considerations:
23 Make a struct for the array that holds:
24 Rank
25 Any variables that go in
26 Types that aren't handled by CIVL
27 cl_mem variables being ignored?
28
29Figure out something to do with local variables
30
31How to make sure that none of the numbers are
32
33Should the user be expected to change variables that end up too big for civl?
34
35Remove mentions of "unsigned" as they are not supported yet
36Same for vector types
37
38Basic idea of conversion program:
39Kernel - After getting input on where the kernel is (or not):
40 Get all of the parameters, they will become variables and part of a struct
41 put all of the rest in, add device_id as a parameter, convert get_global_id(0) to something else
42
43
44To simulate workgroups:
45 Possibly have a function in between kernel and $spawn
46
47Problems:
48Sick
49Spent lots of time to figure out odd behavior to realize that floats and random do not work as expected
Note: See TracBrowser for help on using the repository browser.