Changeset View
Changeset View
Standalone View
Standalone View
openmp/trunk/runtime/src/kmp_tasking.c
Show First 20 Lines • Show All 752 Lines • ▼ Show 20 Lines | |||||
// OMPT will be used or not when the serial task is initialized. This function provides the support | // OMPT will be used or not when the serial task is initialized. This function provides the support | ||||
// needed to initialize OMPT for the serial task after the fact. | // needed to initialize OMPT for the serial task after the fact. | ||||
void | void | ||||
__kmp_task_init_ompt( kmp_taskdata_t * task, int tid ) | __kmp_task_init_ompt( kmp_taskdata_t * task, int tid ) | ||||
{ | { | ||||
task->ompt_task_info.task_id = __ompt_task_id_new(tid); | task->ompt_task_info.task_id = __ompt_task_id_new(tid); | ||||
task->ompt_task_info.function = NULL; | task->ompt_task_info.function = NULL; | ||||
task->ompt_task_info.frame = (ompt_frame_t) { | task->ompt_task_info.frame.exit_runtime_frame = NULL; | ||||
.exit_runtime_frame = NULL, | task->ompt_task_info.frame.reenter_runtime_frame = NULL; | ||||
.reenter_runtime_frame = NULL | |||||
}; | |||||
} | } | ||||
#endif | #endif | ||||
//---------------------------------------------------------------------------------------------------- | //---------------------------------------------------------------------------------------------------- | ||||
// __kmp_init_implicit_task: Initialize the appropriate fields in the implicit task for a given thread | // __kmp_init_implicit_task: Initialize the appropriate fields in the implicit task for a given thread | ||||
// | // | ||||
// loc_ref: reference to source location of parallel region | // loc_ref: reference to source location of parallel region | ||||
▲ Show 20 Lines • Show All 257 Lines • ▼ Show 20 Lines | #endif | ||||
KA_TRACE(20, ("__kmp_task_alloc(exit): T#%d created task %p parent=%p\n", | KA_TRACE(20, ("__kmp_task_alloc(exit): T#%d created task %p parent=%p\n", | ||||
gtid, taskdata, taskdata->td_parent) ); | gtid, taskdata, taskdata->td_parent) ); | ||||
#if OMPT_SUPPORT | #if OMPT_SUPPORT | ||||
if (ompt_status & ompt_status_track) { | if (ompt_status & ompt_status_track) { | ||||
taskdata->ompt_task_info.task_id = __ompt_task_id_new(gtid); | taskdata->ompt_task_info.task_id = __ompt_task_id_new(gtid); | ||||
taskdata->ompt_task_info.function = (void*) task_entry; | taskdata->ompt_task_info.function = (void*) task_entry; | ||||
taskdata->ompt_task_info.frame = (ompt_frame_t) | taskdata->ompt_task_info.frame.exit_runtime_frame = NULL; | ||||
{ .exit_runtime_frame = NULL, .reenter_runtime_frame = NULL }; | taskdata->ompt_task_info.frame.reenter_runtime_frame = NULL; | ||||
} | } | ||||
#endif | #endif | ||||
return task; | return task; | ||||
} | } | ||||
kmp_task_t * | kmp_task_t * | ||||
▲ Show 20 Lines • Show All 1,790 Lines • Show Last 20 Lines |