Changeset View
Changeset View
Standalone View
Standalone View
libomptarget/deviceRTLs/nvptx/src/parallel.cu
Show First 20 Lines • Show All 415 Lines • ▼ Show 20 Lines | EXTERN void __kmpc_end_serialized_parallel(kmp_Ident *loc, | ||||
SafeFree(currTaskDescr, (char *)"new seq parallel task"); | SafeFree(currTaskDescr, (char *)"new seq parallel task"); | ||||
currTaskDescr = getMyTopTaskDescriptor(threadId); | currTaskDescr = getMyTopTaskDescriptor(threadId); | ||||
currTaskDescr->RestoreLoopData(); | currTaskDescr->RestoreLoopData(); | ||||
} | } | ||||
EXTERN uint16_t __kmpc_parallel_level(kmp_Ident *loc, uint32_t global_tid) { | EXTERN uint16_t __kmpc_parallel_level(kmp_Ident *loc, uint32_t global_tid) { | ||||
PRINT0(LD_IO, "call to __kmpc_parallel_level\n"); | PRINT0(LD_IO, "call to __kmpc_parallel_level\n"); | ||||
return parallelLevel[GetWarpId()] & (OMP_ACTIVE_PARALLEL_LEVEL - 1); | return getParallelLevel(GetWarpId()) & (OMP_ACTIVE_PARALLEL_LEVEL - 1); | ||||
} | } | ||||
// This kmpc call returns the thread id across all teams. It's value is | // This kmpc call returns the thread id across all teams. It's value is | ||||
// cached by the compiler and used when calling the runtime. On nvptx | // cached by the compiler and used when calling the runtime. On nvptx | ||||
// it's cheap to recalculate this value so we never use the result | // it's cheap to recalculate this value so we never use the result | ||||
// of this call. | // of this call. | ||||
EXTERN int32_t __kmpc_global_thread_num(kmp_Ident *loc) { | EXTERN int32_t __kmpc_global_thread_num(kmp_Ident *loc) { | ||||
int tid = GetLogicalThreadIdInBlock(checkSPMDMode(loc)); | int tid = GetLogicalThreadIdInBlock(checkSPMDMode(loc)); | ||||
Show All 38 Lines |