In OpenCL, the clLinkProgram() function takes (among other things)
- A
cl_contextcontext handle; - An array of
cl_programhandles of program objects.
Now, a cl_program is always created in a context; and unless I'm mistaken, all programs being linked must share the same context. It should therefore be possible to just obtain the programs' context handle.
So: Is the context handle parameter of clLinkProgram() redundant?