einpoklum
einpoklum

Reputation: 132128

clBuildProgram vs clCompileProgram - when should I call each of these?

In regular software development parlance, we begin with program sources; we then compile them into binary objects; and finally link the objects them into an executable object. And the entire process is called a build.

Now, in the OpenCL API, we have two functions named clCompileProgram() and clBuildProgram() and . If I were to go by intuition, I would assume that clCompileProgram() only works on programs created with text sources, or at most intermediate language; and that the result of the compilation must then undergo clLinkProgram(); and that clBuildProgram() would take inputs at any stage of the build, and bring them all the way to the end, with executable binary objects.

However... the documentation for these function don't seem to clearly agree with that description:

So, what's the deal? Which of these should I use, and in what sequence?

Upvotes: 1

Views: 20

Answers (0)

Related Questions