On 16.11.2017 08:46, Wuweijia wrote:
I do not how the pocl add the definition of _local_id_x , _local_id_y ... to the final shared object. Can you show me where or how. I check the code that _local_id_x _local_id_y variable is external, not the definition.
They are placeholder declarations which are converted to "context array" field accesses by the LLVM pass in lib/llvmopencl/Workgroup.cc (privatizeContext). The "context array" is given as a hidden extra argument to the kernel and contains ids etc. related to the launch of the kernel. For non-GPUs, the ids are iterated by the parallel work item loops generated to execute the whole work-group's WIs in a single function. BR, -- Pekka ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
