Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/DeviceRTL/src/Mapping.cpp
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | |||||
bool mapping::isSPMDMode() { return IsSPMDMode; } | bool mapping::isSPMDMode() { return IsSPMDMode; } | ||||
bool mapping::isGenericMode() { return !isSPMDMode(); } | bool mapping::isGenericMode() { return !isSPMDMode(); } | ||||
///} | ///} | ||||
extern "C" { | extern "C" { | ||||
__attribute__((noinline)) uint32_t __kmpc_get_hardware_thread_id_in_block() { | __attribute__((noinline)) uint32_t __kmpc_get_hardware_thread_id_in_block() { | ||||
FunctionTracingRAII(); | |||||
return mapping::getThreadIdInBlock(); | return mapping::getThreadIdInBlock(); | ||||
} | } | ||||
__attribute__((noinline)) uint32_t __kmpc_get_hardware_num_threads_in_block() { | __attribute__((noinline)) uint32_t __kmpc_get_hardware_num_threads_in_block() { | ||||
FunctionTracingRAII(); | |||||
return mapping::getNumberOfProcessorElements(); | return mapping::getNumberOfProcessorElements(); | ||||
} | } | ||||
} | } | ||||
#pragma omp end declare target | #pragma omp end declare target |