tra added a comment. In http://reviews.llvm.org/D20034#423945, @jlebar wrote:
> What are we supposed to do if we encounter a static __shared__ variable in an > HD function? Presumably that also should be an error if we invoke the HD > function from the device? nvcc produces an error only of such HD function is used from a __host__ function: error: a function scope variable cannot be declared with "shared" inside a host function Considering that each block gets its own instance of that shared variable, there's no way to access it from host in principle so the error makes sense. I'll add it in a separate patch. http://reviews.llvm.org/D20034 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits