We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2792290 commit 712bdd1Copy full SHA for 712bdd1
offload/libomptarget/OpenMP/API.cpp
@@ -94,8 +94,7 @@ EXTERN int omp_get_device_num(void) {
94
EXTERN int omp_get_initial_device(void) {
95
TIMESCOPE();
96
OMPT_IF_BUILT(ReturnAddressSetterRAII RA(__builtin_return_address(0)));
97
- int NumDevices = omp_get_num_devices();
98
- int HostDevice = NumDevices == 0 ? -1 : NumDevices;
+ int HostDevice = omp_get_num_devices();
99
DP("Call to omp_get_initial_device returning %d\n", HostDevice);
100
return HostDevice;
101
}
0 commit comments