1.23
2.0
main
test-branch
| Line | |
|---|
| 1 | use demoCL in Xcode to get hardware info (driver version openCL 1.1)
|
|---|
| 2 |
|
|---|
| 3 | square.c
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | Types:
|
|---|
| 7 | size_t
|
|---|
| 8 | cl_device_id
|
|---|
| 9 | cl_context
|
|---|
| 10 | cl_command_queue
|
|---|
| 11 | cl_program
|
|---|
| 12 | cl_kernel
|
|---|
| 13 |
|
|---|
| 14 | cl_mem
|
|---|
| 15 | Types for now are just structs, see cl.h
|
|---|
| 16 | ------Above this line are implemented-------
|
|---|
| 17 | Hardware methods:
|
|---|
| 18 |
|
|---|
| 19 | methods are externs
|
|---|
| 20 | Declared but not defined unless given one
|
|---|
| 21 |
|
|---|
| 22 | clGetDeviceIDs
|
|---|
| 23 | uses int err, takes 5 parameters
|
|---|
| 24 | http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetDeviceIDs.html
|
|---|
| 25 | -IN PROGRESS-
|
|---|
| 26 |
|
|---|
| 27 | cl_int clGetPlatformIDs( cl_uint num_entries,
|
|---|
| 28 | cl_platform_id *platforms,
|
|---|
| 29 | cl_uint *num_platforms)
|
|---|
| 30 |
|
|---|
| 31 | clCreateContext
|
|---|
| 32 | uses a cl_context context, takes 6 parameters
|
|---|
| 33 | http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clCreateContext.html
|
|---|
| 34 | openCL uses them for commands, memory, program, kernel objects, executing kernels
|
|---|
| 35 | [x]
|
|---|
| 36 |
|
|---|
| 37 | Kernels and other:
|
|---|
| 38 | clCreateCommandQueue
|
|---|
| 39 | uses a cl_command_queue commands, takes 4 parameters
|
|---|
| 40 | uses &device_id and &err
|
|---|
| 41 | http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clCreateCommandQueue.html
|
|---|
| 42 |
|
|---|
| 43 | clCreateProgramWithSource
|
|---|
| 44 | uses cl_program program, takes 5 parameters
|
|---|
| 45 | uses context
|
|---|
| 46 |
|
|---|
| 47 | clBuildProgram
|
|---|
| 48 |
|
|---|
| 49 | clGetProgramBuildInfo
|
|---|
| 50 |
|
|---|
| 51 | clCreateKernel
|
|---|
| 52 |
|
|---|
| 53 | clCreateBuffer
|
|---|
| 54 |
|
|---|
| 55 | clEnqueueWriteBuffer
|
|---|
| 56 |
|
|---|
| 57 | clSetKernelArg
|
|---|
| 58 |
|
|---|
| 59 | clGetKernelWorkGroupInfo
|
|---|
| 60 |
|
|---|
| 61 | clEnqueueReadBuffer
|
|---|
| 62 |
|
|---|
| 63 | clReleaseMemObject
|
|---|
| 64 |
|
|---|
| 65 | clReleaseProgram
|
|---|
| 66 |
|
|---|
| 67 | clReleaseKernel
|
|---|
| 68 |
|
|---|
| 69 | clReleaseCommandQueue
|
|---|
| 70 |
|
|---|
| 71 | clReleaseContext
|
|---|
| 72 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.