
CUDA support can be enabled in clang-repl with --cuda flag. Device code linking is not yet supported. inline must be used with all __device__ functions. Differential Revision: https://reviews.llvm.org/D146389
12 lines
224 B
Plaintext
12 lines
224 B
Plaintext
// RUN: cat %s | clang-repl --cuda | FileCheck %s
|
|
|
|
extern "C" int printf(const char*, ...);
|
|
|
|
__global__ void test_func() {}
|
|
|
|
test_func<<<1,1>>>();
|
|
printf("CUDA Error: %d", cudaGetLastError());
|
|
// CHECK: CUDA Error: 0
|
|
|
|
%quit
|