|
5 | 5 |
|
6 | 6 | #include <cstring> |
7 | 7 | #include <limits> |
| 8 | +#include <omp-tools.h> |
8 | 9 |
|
9 | 10 | #define expectedDefault(TypeName) std::numeric_limits<TypeName>::min() |
10 | 11 |
|
@@ -32,14 +33,100 @@ event_class_w_custom_body(ParallelBegin, \ |
32 | 33 | ParallelBegin(int NumThreads) \ |
33 | 34 | : InternalEvent(EventTy::ParallelBegin), NumThreads(NumThreads) {} \ |
34 | 35 | \ |
35 | | - int NumThreads; \ |
| 36 | + unsigned int NumThreads; \ |
36 | 37 | ) |
37 | 38 | event_class_w_custom_body(ParallelEnd, \ |
38 | | - ParallelEnd() : InternalEvent(EventTy::ParallelEnd) {} \ |
| 39 | + ParallelEnd(ompt_data_t *ParallelData, ompt_data_t *EncounteringTaskData, \ |
| 40 | + int Flags, const void *CodeptrRA) \ |
| 41 | + : InternalEvent(EventTy::ParallelEnd), ParallelData(ParallelData), \ |
| 42 | + EncounteringTaskData(EncounteringTaskData), Flags(Flags), \ |
| 43 | + CodeptrRA(CodeptrRA) {} \ |
| 44 | + \ |
| 45 | +ompt_data_t *ParallelData; \ |
| 46 | +ompt_data_t *EncounteringTaskData; \ |
| 47 | +int Flags; \ |
| 48 | +const void *CodeptrRA; \ |
| 49 | +) |
| 50 | +event_class_w_custom_body(Work, \ |
| 51 | + Work(ompt_work_t WorkType, ompt_scope_endpoint_t Endpoint, \ |
| 52 | + ompt_data_t *ParallelData, ompt_data_t *TaskData, uint64_t Count, \ |
| 53 | + const void *CodeptrRA) \ |
| 54 | + : InternalEvent(EventTy::Work), WorkType(WorkType), Endpoint(Endpoint), \ |
| 55 | + ParallelData(ParallelData), TaskData(TaskData), Count(Count), \ |
| 56 | + CodeptrRA(CodeptrRA) {} \ |
| 57 | + \ |
| 58 | +ompt_work_t WorkType; \ |
| 59 | +ompt_scope_endpoint_t Endpoint; \ |
| 60 | +ompt_data_t *ParallelData; \ |
| 61 | +ompt_data_t *TaskData; \ |
| 62 | +uint64_t Count; \ |
| 63 | +const void *CodeptrRA; \ |
39 | 64 | ) |
40 | | -event_class_stub(TaskCreate) |
| 65 | +event_class_w_custom_body(Dispatch, \ |
| 66 | + Dispatch(ompt_data_t *ParallelData, ompt_data_t *TaskData, \ |
| 67 | + ompt_dispatch_t Kind, ompt_data_t Instance) \ |
| 68 | + : InternalEvent(EventTy::Dispatch), ParallelData(ParallelData), \ |
| 69 | + TaskData(TaskData), Kind(Kind), Instance(Instance) {} \ |
| 70 | + \ |
| 71 | +ompt_data_t *ParallelData; \ |
| 72 | +ompt_data_t *TaskData; \ |
| 73 | +ompt_dispatch_t Kind; \ |
| 74 | +ompt_data_t Instance; \ |
| 75 | +) |
| 76 | +event_class_w_custom_body(TaskCreate, \ |
| 77 | + TaskCreate(ompt_data_t *EncounteringTaskData, \ |
| 78 | + const ompt_frame_t *EncounteringTaskFrame, \ |
| 79 | + ompt_data_t *NewTaskData, int Flags, int HasDependences, \ |
| 80 | + const void *CodeptrRA) \ |
| 81 | + : InternalEvent(EventTy::TaskCreate), \ |
| 82 | + EncounteringTaskData(EncounteringTaskData), \ |
| 83 | + EncounteringTaskFrame(EncounteringTaskFrame), NewTaskData(NewTaskData), \ |
| 84 | + Flags(Flags), HasDependences(HasDependences), CodeptrRA(CodeptrRA) {} \ |
| 85 | + \ |
| 86 | +ompt_data_t *EncounteringTaskData; \ |
| 87 | +const ompt_frame_t *EncounteringTaskFrame; \ |
| 88 | +ompt_data_t *NewTaskData; \ |
| 89 | +int Flags; \ |
| 90 | +int HasDependences; \ |
| 91 | +const void *CodeptrRA; \ |
| 92 | +) |
| 93 | +event_class_stub(Dependences) |
| 94 | +event_class_stub(TaskDependence) |
41 | 95 | event_class_stub(TaskSchedule) |
42 | | -event_class_stub(ImplicitTask) |
| 96 | +event_class_w_custom_body(ImplicitTask, \ |
| 97 | + ImplicitTask(ompt_scope_endpoint_t Endpoint, ompt_data_t *ParallelData, \ |
| 98 | + ompt_data_t *TaskData, unsigned int ActualParallelism, \ |
| 99 | + unsigned int Index, int Flags) \ |
| 100 | + : InternalEvent(EventTy::ImplicitTask), Endpoint(Endpoint), \ |
| 101 | + ParallelData(ParallelData), TaskData(TaskData), ActualParallelism(ActualParallelism),\ |
| 102 | + Index(Index), Flags(Flags) {} \ |
| 103 | + \ |
| 104 | +ompt_scope_endpoint_t Endpoint; \ |
| 105 | +ompt_data_t *ParallelData; \ |
| 106 | +ompt_data_t *TaskData; \ |
| 107 | +unsigned int ActualParallelism; \ |
| 108 | +unsigned int Index; \ |
| 109 | +int Flags; \ |
| 110 | +) |
| 111 | +event_class_stub(Masked) |
| 112 | +event_class_w_custom_body(SyncRegion, \ |
| 113 | + SyncRegion(ompt_sync_region_t Kind, ompt_scope_endpoint_t Endpoint, \ |
| 114 | + ompt_data_t *ParallelData, ompt_data_t *TaskData, \ |
| 115 | + const void *CodeptrRA) \ |
| 116 | + : InternalEvent(EventTy::SyncRegion), Kind(Kind), Endpoint(Endpoint), \ |
| 117 | + ParallelData(ParallelData), TaskData(TaskData), CodeptrRA(CodeptrRA) {} \ |
| 118 | + \ |
| 119 | +ompt_sync_region_t Kind; \ |
| 120 | +ompt_scope_endpoint_t Endpoint; \ |
| 121 | +ompt_data_t *ParallelData; \ |
| 122 | +ompt_data_t *TaskData; \ |
| 123 | +const void *CodeptrRA; \ |
| 124 | +) |
| 125 | +event_class_stub(MutexAcquire) |
| 126 | +event_class_stub(Mutex) |
| 127 | +event_class_stub(NestLock) |
| 128 | +event_class_stub(Flush) |
| 129 | +event_class_stub(Cancel) |
43 | 130 | event_class_w_custom_body(Target, \ |
44 | 131 | Target(ompt_target_t Kind, ompt_scope_endpoint_t Endpoint, int DeviceNum, \ |
45 | 132 | ompt_data_t *TaskData, ompt_id_t TargetId, const void *CodeptrRA) \ |
|
0 commit comments