aboutsummaryrefslogtreecommitdiff
path: root/offload/unittests/OffloadAPI/device_code/global_dtor.cpp
blob: 6b1f941342b40f6414adb81630c25cd27ebabfac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <gpuintrin.h>
#include <stdint.h>

extern "C" {

uint32_t global[64];

[[gnu::destructor]] void dtor() {
  for (unsigned I = 0; I < 64; I++)
    global[I] = 1;
}

__gpu_kernel void global_dtor() {
  // no-op
}
} // extern "C"