On 09/12/2012 10:30 PM, Villmow, Micah wrote: >> case there are better ways to do that (metadata) > [Villmow, Micah] I disagree, the 'kernel' keyword specifies a different > calling convention from functions that don't have it. So we need a calling > convention that maps to that. The ABI for a kernel is different than the > ABI for a non-kernel function. The regular function itself also is > different than the default calling convention because it has restrictions > on it(one being it can only be called from a kernel function or another > device function) that the normal calling convention does not. A way to > think about this is that this is more similar to the PTX_[Kernel|Device] > calling conventions than the default, fast or stdcall conventions. I don't > think metadata is the right approach here since we are specifying unique > ways for how these functions can be called.
For what it's worth, this issue manifests itself in an unsolved pocl bug: https://bugs.launchpad.net/pocl/+bug/987905 It would be simpler to implement a portable implementation for calling the kernel from the host if we could assume the kernel calling convention mapped each OpenCL setArg arg to a single kernel function arg (and preferably all arg data in memory). For the non-kernel functions it should not matter and could be target-specific. -- Pekka ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
