Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
diff VSs.h @ 39:0715109abb08
make wrapper lib for linking against files produced by mercurium (ompss preprocessor) -- ! separates args and dependencies
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 03 Jun 2013 18:34:56 +0200 |
| parents | a951b38d2cfc |
| children | 37bb39da5ff1 |
line diff
1.1 --- a/VSs.h Fri May 17 17:49:49 2013 +0200 1.2 +++ b/VSs.h Mon Jun 03 18:34:56 2013 +0200 1.3 @@ -58,10 +58,9 @@ 1.4 typedef struct 1.5 { 1.6 VSsTaskFnPtr fn; 1.7 - int32 numTotalArgs;//the number of inputs to function 1.8 - int32 numCtldArgs;//how many of args have dependencies 1.9 - int32 *argTypes; //says reader, writer, or non-ctld 1.10 - int32 *argSizes; //for detecting overlap 1.11 + int32 numDeps;//how many of args have dependencies 1.12 + int32 *depsTypes; //says reader, writer, or non-ctld 1.13 + size_t *depsSizes; //for detecting overlap 1.14 int32 sizeOfArgs; //for memcpy of args struct 1.15 } 1.16 VSsTaskType; 1.17 @@ -80,7 +79,8 @@ 1.18 VSsPointerEntry; 1.19 1.20 typedef struct { 1.21 - void **args; //ctld args must come first, as ptrs 1.22 + void **args; //for calling only, can contain values 1.23 + void** depsAddrs; //pointers only 1.24 VSsTaskType *taskType; 1.25 int32 *taskID; 1.26 int32 numBlockingProp; 1.27 @@ -92,7 +92,7 @@ 1.28 bool32 isWaitingForChildTasksToEnd; 1.29 bool32 isWaitingForChildThreadsToEnd; 1.30 bool32 isEnded; 1.31 - int *argsMask; 1.32 + int *depsMask; 1.33 #ifdef HOLISTIC__TURN_ON_OBSERVE_UCC 1.34 Unit parentUnit; 1.35 Unit firstOfTask; 1.36 @@ -179,6 +179,7 @@ 1.37 SlaveVP *callingSlv; 1.38 VSsTaskType *taskType; 1.39 void *args; 1.40 + void *deps; 1.41 VSsTaskStub *taskStub; 1.42 1.43 SlaveVP *senderSlv; 1.44 @@ -204,7 +205,7 @@ 1.45 void *dataForFn; 1.46 1.47 int32 transID; 1.48 - int32 criticalID; 1.49 + void* criticalID; 1.50 } 1.51 /* VSsSemReq */; 1.52 1.53 @@ -217,6 +218,7 @@ 1.54 SlaveVP *slotTaskSlvs[NUM_CORES][NUM_ANIM_SLOTS]; 1.55 HashTable *argPtrHashTbl; 1.56 HashTable *commHashTbl; 1.57 + HashTable *criticalHashTbl; 1.58 int32 numLiveExtraTaskSlvs; 1.59 int32 numLiveThreadSlvs; 1.60 int32 nextCoreToGetNewSlv; 1.61 @@ -225,7 +227,7 @@ 1.62 //fix limit on num with dynArray 1.63 VSsSingleton fnSingletons[NUM_STRUCS_IN_SEM_ENV]; 1.64 VSsTrans transactionStrucs[NUM_STRUCS_IN_SEM_ENV]; 1.65 - VSsCritical criticalSection[NUM_STRUCS_IN_SEM_ENV]; 1.66 + 1.67 1.68 bool32 *coreIsDone; 1.69 int32 numCoresDone; 1.70 @@ -331,13 +333,13 @@ 1.71 1.72 //======================= 1.73 void 1.74 -VSs__submit_task( VSsTaskType *taskType, void *args); 1.75 +VSs__submit_task( VSsTaskType *taskType, void *args, void* deps); 1.76 1.77 int32 * 1.78 VSs__create_taskID_of_size( int32 numInts); 1.79 1.80 void 1.81 -VSs__submit_task_with_ID( VSsTaskType *taskType, void *args, int32 *taskID); 1.82 +VSs__submit_task_with_ID( VSsTaskType *taskType, void *args, void* deps, int32 *taskID); 1.83 1.84 void VSs__run_task(TopLevelFnPtr fnPtr, void *initData); 1.85 1.86 @@ -352,10 +354,10 @@ 1.87 VSs__taskwait_on(void* ptr); 1.88 1.89 void 1.90 -VSs__start_critical(int32 name); 1.91 +VSs__start_critical(void* name); 1.92 1.93 void 1.94 -VSs__end_critical(int32 name); 1.95 +VSs__end_critical(void* name); 1.96 1.97 int32 * 1.98 VSs__give_self_taskID();
