tra added a comment.

In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote:

> What exactly are you trying to express here?  Are you just trying to make 
> these external declarations when compiling for the device because 
> `__shared__` variables are actually defined on the host?  That should be 
> handled by the frontend by setting up the AST so that these declarations are 
> not definitions.


__shared__ vars (at least in CUDA) are weird. Local-scoped ones are implicitly 
static (which compiler will attempt to zero-init) but in CUDA __shared__ 
variables can't have static initializers and we don't know the value of such 
vars when we launch the kernel.


https://reviews.llvm.org/D44985



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to