0

In OpenCL, the clLinkProgram() function takes (among other things)

  • A cl_context context handle;
  • An array of cl_program handles 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?

1 Answer 1

0

From reading the documentation, it appears that clLinkProgram will only link for the provided cl_context. This seems to be to allow a programmer to create cl_program objects with binary source for multiple platforms, and link them at runtime to the desired cl_context.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.