sched1: debug/model: dump predecessor list and BB num [NFC]
[gcc.git] / libgomp / testsuite / libgomp.c / declare-variant-3.h
blob38ee257e42dabb31b81fbc5f892a14c9e0167e60
1 #pragma omp declare target
3 __attribute__ ((noipa))
4 int
5 f30 (void)
7 return 30;
10 __attribute__ ((noipa))
11 int
12 f35 (void)
14 return 35;
17 __attribute__ ((noipa))
18 int
19 f53 (void)
21 return 53;
24 __attribute__ ((noipa))
25 int
26 f70 (void)
28 return 70;
31 __attribute__ ((noipa))
32 int
33 f75 (void)
35 return 75;
38 __attribute__ ((noipa))
39 int
40 f80 (void)
42 return 80;
45 #pragma omp declare variant (f30) match (device={isa("sm_30")})
46 #pragma omp declare variant (f35) match (device={isa("sm_35")})
47 #pragma omp declare variant (f53) match (device={isa("sm_53")})
48 #pragma omp declare variant (f70) match (device={isa("sm_70")})
49 #pragma omp declare variant (f75) match (device={isa("sm_75")})
50 #pragma omp declare variant (f80) match (device={isa("sm_80")})
51 __attribute__ ((noipa))
52 int
53 f (void)
55 return 0;
58 #pragma omp end declare target
60 int
61 main (void)
63 int v = 0;
65 #pragma omp target map(from:v)
66 v = f ();
68 #ifdef OFFLOAD_DEVICE_NVPTX
69 if (v == 0)
70 __builtin_abort ();
72 __builtin_printf ("Nvptx accelerator: sm_%d\n", v);
73 #else
74 if (v != 0)
75 __builtin_abort ();
76 #endif
78 return 0;