[PATCH] D12241: [CUDA] Change initializer for CUDA device code based on CUDA documentation.

Xuetian Weng via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 11:16:53 PDT 2015


wengxt added a comment.

> Just say: __shared__ variables cannot have an initialization as part of their declaration. Whether being kept across invocations is undefined.


My intention is to explain that why __shared__ varible should be undefined instead of zero-initialized. Being unable to have initialization as declaration does not assume that it may contain random value.


http://reviews.llvm.org/D12241





More information about the llvm-commits mailing list