summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCUDA/ptx-kernels.cu
blob: f0bf2952a12639a4c8c96d39f2c4a0da89540528 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 %s -triple nvptx-unknown-unknown -fcuda-is-device -emit-llvm -o - | FileCheck %s

#include "../SemaCUDA/cuda.h"

// CHECK: define ptx_device{{.*}}device_function
__device__ void device_function() {}

// CHECK: define ptx_kernel{{.*}}global_function
__global__ void global_function() {
  // CHECK: call ptx_device{{.*}}device_function
  device_function();
}
OpenPOWER on IntegriCloud