Thanks for using Compiler Explorer
Sponsors
C++
LLVM IR
Cppx
Cppx-Gold
Cppx-Blue
C
Rust
D
Go
ispc
Haskell
OCaml
Python
Swift
Pascal
Fortran
Assembly
Analysis
CUDA
Zig
Clean
Ada
Nim
cuda source #1
Output
Compile to binary
Run the compiled output
Intel asm syntax
Demangle identifiers
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Compiler
NVCC 10.0.130
NVCC 10.1.105
NVCC 10.1.105
NVCC 10.1.168
NVCC 10.2.89
NVCC 11.0.2
NVCC 11.0.3
NVCC 11.1.1
NVCC 11.2.0
NVCC 11.2.1
NVCC 11.2.2
NVCC 9.1.85
NVCC 9.2.88
clang (CUDA 9.1.85) 10.0.0
clang (CUDA 9.1.85) 10.0.1
clang (CUDA 9.1.85) 11.0.0
clang (CUDA 9.1.85) 7.0.0
clang (CUDA 9.1.85) 8.0.0
clang (CUDA 9.1.85) 9.0.0
clang (CUDA 9.1.85) trunk
Options
Source code
// Type your code here, or load an example. __global__ void square(int *array, int n) { int tid = blockIdx.x; if (tid < n) array[tid] = array[tid] * array[tid]; }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
About the author
Changelog
Version tree