This revision was automatically updated to reflect the committed changes.
Closed by commit rL261777: [CUDA] Add conversion operators for threadIdx,
blockIdx, gridDim, and… (authored by jlebar).
Changed prior to commit:
http://reviews.llvm.org/D17561?vs=48884=48978#toc
Repository:
rL LLVM
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
OK.
http://reviews.llvm.org/D17561
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jlebar added inline comments.
Comment at: lib/Headers/cuda_builtin_vars.h:72
@@ -66,1 +71,3 @@
+ // uint3). This function is defined after we pull in vector_types.h.
+ __attribute__((device)) operator uint3() const;
private:
tra wrote:
> Considering that
tra added inline comments.
Comment at: lib/Headers/cuda_builtin_vars.h:72
@@ -66,1 +71,3 @@
+ // uint3). This function is defined after we pull in vector_types.h.
+ __attribute__((device)) operator uint3() const;
private:
Considering that built-in variables
jlebar created this revision.
jlebar added a reviewer: tra.
jlebar added subscribers: cfe-commits, echristo.
This lets you write, e.g.
uint3 a = threadIdx;
uint3 b = blockIdx;
dim3 c = gridDim;
dim3 d = blockDim;
which is legal in nvcc, but was not legal in clang.
The fact that e.g.