AnsweredAssumed Answered

OpenCL kernel scalar arguments

Question asked by gcu01 on May 9, 2017
Latest reply on May 12, 2017 by gcu01


I have two questions related to the arguments of an OpenCL kernel. Please, correct me if I'm wrong in the context that I used to describe my questions.


The scalar arguments (e.g., kernel foo (int a) ) are placed in the private address space (like all the kernel arguments, regardless if they are scalar or not). There is no need of __private keyword; by default arguments are placed in the private address space.

Q1: who takes care of placing the scalar in the GPU private address space? there is no need of explicit transfer operation (from CPU to GPU address space) for a scalar. why is that?

Q2: can I have a scalar as an argument output? I want to get, among other arrays, one value from a kernel calculation.