<div dir="ltr">Hi,<div>Our lab is working on compiling opencl 2.x into NVPTX</div><div>But we have encountered some problems in dynamic parallelism. Blocks, particularly.</div><div>In short, clang would try to use Objective-C's approach to compile blocks in CL code.</div><div>It would generate block_literal struct to hold block information and block_descriptor to hold captured variables.</div><div><br></div><div>My first question is:</div><div>There is a field in block_literal called "isa" representing the type of this block. But this field seems to always set to external symbols starts with "_NS", which is Cocoa's symbols. Is this necessary? </div><div><br></div><div>Second, clang put captured variables in block_descriptor and passed the entire block_literal, which also contains a field holding pointer to a block_descriptor instance, as a implicit "0 th" arguments for the real invoked function. But it seems that this approach doesn't wok well with CL language since it's hard to handling the address space of block_literal instances.</div><div>We have an idea passing all of the captured variables as function arguments, by value, for the invoked function. What do you folks think?</div><div><br></div><div>Last but not the least, Is there anyone working on implementing dynamic parallelism? There seems to be no discussions about that on this mailing list.</div><div><br></div><div>Best Regards,</div><div><br></div></div>