2 Replies Latest reply on May 12, 2017 3:39 AM by gcu01

    OpenCL kernel scalar arguments

    gcu01

      Hi,

      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.