Mercurial > cgi-bin > hgwebdir.cgi > PR > PR_Implementations > PR__Univ > PR__includes > PR__include
changeset 7:e0bd5a1424fb Dev_Univ
Adds small changes -- working version same as ML lib brch at this point
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Sun, 15 Sep 2013 11:39:40 -0700 |
| parents | c390d605702c |
| children | |
| files | PR__structs__common.h Services_offered_by_PR/MEAS__Counter_Recording.h langlets/PRServ__wrapper_library.h langlets/vreo_wrapper_library.h |
| diffstat | 4 files changed, 94 insertions(+), 141 deletions(-) [+] |
line diff
1.1 --- a/PR__structs__common.h Sun Sep 15 07:20:10 2013 -0700 1.2 +++ b/PR__structs__common.h Sun Sep 15 11:39:40 2013 -0700 1.3 @@ -244,7 +244,7 @@ 1.4 PRLangData **langDatas; //Lang saves lang-specific things in slave here 1.5 PRMetaTask **metaTasks; 1.6 1.7 - PRGhostInfo *ghostInfo; 1.8 +// PRGhostInfo *ghostInfo; 1.9 1.10 //=========== MEASUREMENT STUFF ========== 1.11 MEAS__Insert_Meas_Fields_into_Slave;
2.1 --- a/Services_offered_by_PR/MEAS__Counter_Recording.h Sun Sep 15 07:20:10 2013 -0700 2.2 +++ b/Services_offered_by_PR/MEAS__Counter_Recording.h Sun Sep 15 11:39:40 2013 -0700 2.3 @@ -8,7 +8,7 @@ 2.4 #ifndef MEAS__COUNTER_RECORDING_H 2.5 #define MEAS__COUNTER_RECORDING_H 2.6 2.7 -#include "PR__common_includes/PR__common_structs.h" 2.8 +#include <PR__include/PR__structs__common.h> 2.9 2.10 typedef struct 2.11 {
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/langlets/PRServ__wrapper_library.h Sun Sep 15 11:39:40 2013 -0700 3.3 @@ -0,0 +1,92 @@ 3.4 +/* 3.5 + * Copyright 2009 OpenSourceResearchInstitute.org 3.6 + * Licensed under GNU General Public License version 2 3.7 + * 3.8 + * Author: seanhalle@yahoo.com 3.9 + * 3.10 + */ 3.11 + 3.12 +#ifndef _PRServ_wrapper_library_H 3.13 +#define _PRServ_wrapper_library_H 3.14 + 3.15 +#include <PR__include/PR__structs__common.h> 3.16 + 3.17 + 3.18 +//=========================================================================== 3.19 +typedef void (*PtrToAtomicFn ) ( void * ); //executed atomically in master 3.20 + 3.21 +/*WARNING: assembly hard-codes position of endInstrAddr as first field 3.22 + */ 3.23 +typedef struct 3.24 + { 3.25 + void *endInstrAddr; 3.26 + int32 hasBeenStarted; 3.27 + int32 hasFinished; 3.28 + PrivQueueStruc *waitQ; 3.29 + } 3.30 +PRServSingleton; 3.31 + 3.32 + 3.33 +//=========================================================================== 3.34 + 3.35 +int32 3.36 +PRServ__giveMinWorkUnitCycles( float32 percentOverhead ); 3.37 + 3.38 +void 3.39 +PRServ__begin_primitive(); 3.40 + 3.41 +int32 3.42 +PRServ__end_primitive_and_give_cycles(); 3.43 + 3.44 +int32 3.45 +PRServ__giveIdealNumWorkUnits(); 3.46 + 3.47 +int32 3.48 +PRServ__give_number_of_cores_to_schedule_onto(); 3.49 + 3.50 +char * 3.51 +PRServ___give_environment_string(); 3.52 + 3.53 +//======================= 3.54 + 3.55 +void 3.56 +PRServ__end_seedVP( SlaveVP *seedSlv ); 3.57 +//======================= 3.58 + 3.59 +inline int32 * 3.60 +PRServ__create_taskID_of_size( int32 numInts, SlaveVP *animSlv ); 3.61 + 3.62 +//========================= 3.63 +void 3.64 +PRServ__taskwait(SlaveVP *animSlv); 3.65 + 3.66 +inline int32 * 3.67 +PRServ__give_self_taskID( SlaveVP *animSlv ); 3.68 + 3.69 +//======================= Concurrency Stuff ====================== 3.70 +void 3.71 +PRServ__start_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 3.72 + 3.73 +void 3.74 +PRServ__end_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 3.75 + 3.76 +void 3.77 +PRServ__start_data_singleton( PRServSingleton **singeltonAddr, SlaveVP *animSlv ); 3.78 + 3.79 +void 3.80 +PRServ__end_data_singleton( PRServSingleton **singletonAddr, SlaveVP *animSlv ); 3.81 + 3.82 +void 3.83 +PRServ__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, 3.84 + void *data, SlaveVP *animSlv ); 3.85 + 3.86 +void 3.87 +PRServ__start_transaction( int32 transactionID, SlaveVP *animSlv ); 3.88 + 3.89 +void 3.90 +PRServ__end_transaction( int32 transactionID, SlaveVP *animSlv ); 3.91 + 3.92 + 3.93 +//=========================================================================== 3.94 +#endif /* _PRServ_H */ 3.95 +
4.1 --- a/langlets/vreo_wrapper_library.h Sun Sep 15 07:20:10 2013 -0700 4.2 +++ b/langlets/vreo_wrapper_library.h Sun Sep 15 11:39:40 2013 -0700 4.3 @@ -10,51 +10,17 @@ 4.4 #define _VREO_WRAPPER_H 4.5 4.6 #include <PR__include/PR__structs__common.h> 4.7 -//#include <PR__include/prqueue.h> 4.8 -//#include <PR__include/prhash.h> 4.9 -//#include "Measurement/dependency.h" 4.10 4.11 //uniquely identifies VSs -- should be a jenkins char-hash of "VSs" to int32 4.12 #define VReo_MAGIC_NUMBER 0000000003 4.13 4.14 //=========================================================================== 4.15 -/* 4.16 - //uniquely identifies VSs -- should be a jenkins char-hash of "VSs" to int32 4.17 -#define VReo_MAGIC_NUMBER 0000000003 4.18 - 4.19 -#define NUM_STRUCS_IN_LANG_ENV 1000 4.20 - 4.21 - //This is hardware dependent -- it's the number of cycles of scheduling 4.22 - // overhead -- if a work unit is fewer than this, it is better being 4.23 - // combined sequentially with other work 4.24 - //This value depends on both PR overhead and VSs's plugin. At some point 4.25 - // it will be derived by perf-counter measurements during init of VSs 4.26 -#define MIN_WORK_UNIT_CYCLES 20000 4.27 -*/ 4.28 - 4.29 -//=========================================================================== 4.30 -/*This header defines everything specific to the VReo semantic plug-in 4.31 - */ 4.32 typedef struct _VReoIsland VReoIsland; 4.33 4.34 -//typedef struct _VReoLangReq VReoLangReq; 4.35 -//typedef struct _VReoTaskStub VReoTaskStub; 4.36 -//typedef void (*VReoTaskFnPtr ) ( void *, SlaveVP *); 4.37 typedef bool32 (*VReoCheckerFn ) ( VReoIsland * ); 4.38 typedef void (*VReoDoerFn ) ( VReoIsland * ); 4.39 //=========================================================================== 4.40 4.41 -/* 4.42 -#define IS_A_VP NULL 4.43 -#define IS_ENDED NULL 4.44 -#define SEED_SLV NULL 4.45 - 4.46 -#define NO_ID NULL 4.47 -#define ANY_CORE -1 4.48 -*/ 4.49 - 4.50 -//=========================================================================== 4.51 - 4.52 typedef struct 4.53 { 4.54 void *buffer; 4.55 @@ -123,88 +89,6 @@ 4.56 VReoCircuit *circuit; 4.57 } 4.58 VReoBirthParams; 4.59 - 4.60 -/*This is VReo's "lang meta task" 4.61 - *See the proto-runtime wiki entry to learn about "lang meta task" 4.62 - *In essence, this holds all the meta information that VReo needs about a task 4.63 - */ 4.64 -/* 4.65 -struct _VReoTaskStub 4.66 - { 4.67 - VReoTaskStub *parentTaskStub; //for liveness, for the wait construct 4.68 - int32 numLiveChildTasks; 4.69 - int32 numLiveChildVPs; 4.70 - bool32 isWaitingForChildTasksToEnd; 4.71 - bool32 isWaitingForChildVPsToEnd; 4.72 - bool32 isEnded; 4.73 - }; 4.74 -*/ 4.75 - 4.76 - 4.77 -/*Semantic-layer-specific data sent inside a request from lib call in app 4.78 - * to request handler called in AnimationMaster 4.79 - */ 4.80 -/* 4.81 -struct _VReoLangReq 4.82 - { 4.83 - SlaveVP *callingVP; 4.84 - 4.85 - BirthFnPtr fnPtr; 4.86 - void *initData; 4.87 - int32 coreToAssignOnto; 4.88 - int32 createSuspendedGroup; 4.89 - 4.90 - VReoCircuit *circuit; 4.91 - VReoPort *port; 4.92 - void *itemToPut; 4.93 - } 4.94 -*/ 4.95 -/* VReoLangReq */; 4.96 - 4.97 - 4.98 -/* 4.99 -typedef struct 4.100 - { 4.101 - PrivQueueStruc *slaveReadyQ; //Shared (slaves not pinned) 4.102 - PrivQueueStruc *taskReadyQ; //Shared (tasks not pinned) 4.103 - 4.104 - int32 nextCoreToGetNewSlv; 4.105 - int32 primitiveStartTime; 4.106 - 4.107 - VReoCircuit *circuit; //used during debugging, to get access when no work 4.108 - 4.109 - #ifdef HOLISTIC__TURN_ON_OBSERVE_UCC 4.110 - ListOfArrays* unitList; 4.111 - ListOfArrays* ctlDependenciesList; 4.112 - ListOfArrays* commDependenciesList; 4.113 - NtoN** ntonGroups; 4.114 - PrivDynArrayInfo* ntonGroupsInfo; 4.115 - ListOfArrays* dynDependenciesList; 4.116 - Unit last_in_slot[NUM_CORES * NUM_ANIM_SLOTS]; 4.117 - ListOfArrays* hwArcs; 4.118 - #endif 4.119 - 4.120 - #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS 4.121 - ListOfArrays* counterList[NUM_CORES]; 4.122 - #endif 4.123 - } 4.124 -VReoLangEnv; 4.125 - 4.126 - 4.127 -typedef struct 4.128 - { 4.129 - VReoCircuit *circuit; 4.130 - int32 numPorts; 4.131 - int32 *ports; 4.132 - } 4.133 -VReoVPParams; 4.134 - 4.135 -typedef struct 4.136 - { 4.137 - VReoVPParams *params; //keep here, so can free when end VP 4.138 - } 4.139 -VReoLangData; 4.140 -*/ 4.141 4.142 //=========================================================================== 4.143 4.144 @@ -236,29 +120,6 @@ 4.145 void 4.146 VReo__end_VP( SlaveVP *VPToEnd ); 4.147 4.148 - 4.149 -//======================= 4.150 - 4.151 - 4.152 -//========================= Internal use only ============================= 4.153 -/* 4.154 -bool32 4.155 -VReo__assign_work_to_slot( void *_langEnv, AnimSlot *slot ); 4.156 - 4.157 -SlaveVP * 4.158 -VReo__create_slave_with_affinity( BirthFnPtr fnPtr, void *initData, 4.159 - SlaveVP *creatingSlv, int32 coreToAssignOnto); 4.160 - 4.161 -void 4.162 -VReo__cleanup_after_shutdown(); 4.163 - 4.164 -//===================== ===================== 4.165 - 4.166 -#include "VReo_Request_Handlers.h" 4.167 - 4.168 -//===================== Measurement of Lang Overheads ===================== 4.169 -#include "Measurement/VReo_Measurement.h" 4.170 -*/ 4.171 //=========================================================================== 4.172 #endif /* _VReo_H */ 4.173
