changeset 12:3afbf8f9294b ML_lib

Merge
author Sean Halle <seanhalle@yahoo.com>
date Thu, 26 Sep 2013 07:26:08 -0700
parents 9d607381c7ca 6fd92a01dc2e
children ad931059d1c4 6bf2610e0fd5
files
diffstat 3 files changed, 85 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/PR__structs__common.h	Thu Sep 26 07:24:31 2013 -0700
     1.2 +++ b/PR__structs__common.h	Thu Sep 26 07:26:08 2013 -0700
     1.3 @@ -147,7 +147,7 @@
     1.4     int32              langMagicNumber;
     1.5     SlaveVP           *requestingSlave;
     1.6     
     1.7 -   BirthFnPtr      topLevelFn;
     1.8 +   BirthFnPtr         birthFn;
     1.9     void              *initData;
    1.10     int32             *ID;
    1.11     
    1.12 @@ -194,7 +194,7 @@
    1.13     int32         needsWorkAssigned;
    1.14     SlaveVP      *slaveAssignedToSlot;
    1.15     
    1.16 -   int32         slotIdx;  //needed by Holistic Model's data gathering
    1.17 +//   int32         slotIdx;  //needed by Holistic Model's data gathering
    1.18     int32         coreSlotIsOn;
    1.19     SlotPerfInfo *perfInfo; //used by assigner to pick best slave for core
    1.20   };
    1.21 @@ -308,7 +308,7 @@
    1.22     int32          *ID;              //is standard PR ID
    1.23     PRProcess      *processTaskIsIn;
    1.24     SlaveVP        *slaveAssignedTo; //not valid until task animated
    1.25 -   BirthFnPtr   topLevelFn;      //This is the Fn executes as the task
    1.26 +   BirthFnPtr      birthFn;         //This is the Fn executes as the task
    1.27     void           *initData;        //The data taken by the function
    1.28     LangMetaTaskFreer freer;
    1.29     bool32          goAheadAndFree;
     2.1 --- a/Services_offered_by_PR/MEAS__Counter_Recording.h	Thu Sep 26 07:24:31 2013 -0700
     2.2 +++ b/Services_offered_by_PR/MEAS__Counter_Recording.h	Thu Sep 26 07:26:08 2013 -0700
     2.3 @@ -8,6 +8,7 @@
     2.4  #ifndef MEAS__COUNTER_RECORDING_H
     2.5  #define	MEAS__COUNTER_RECORDING_H
     2.6  
     2.7 +
     2.8  #include <PR__include/PR__structs__common.h>
     2.9  
    2.10  typedef struct 
     3.1 --- a/langlets/PRServ__wrapper_library.h	Thu Sep 26 07:24:31 2013 -0700
     3.2 +++ b/langlets/PRServ__wrapper_library.h	Thu Sep 26 07:26:08 2013 -0700
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - *  Copyright 2009 OpenSourceResearchInstitute.org
     3.6 + *  Copyright 2009-2013 OpenSourceResearchInstitute.org
     3.7   *  Licensed under GNU General Public License version 2
     3.8   *
     3.9   * Author: seanhalle@yahoo.com
    3.10 @@ -13,7 +13,46 @@
    3.11  
    3.12  
    3.13  //===========================================================================
    3.14 -typedef void  (*PtrToAtomicFn )  ( void * ); //executed atomically in master
    3.15 +typedef void (*PtrToAtomicFn )   ( void * ); //executed atomically in master
    3.16 +
    3.17 +typedef struct _DKUPiece DKUPiece;
    3.18 +typedef struct _DKUInstance DKUInstance;
    3.19 +
    3.20 +typedef void (*DKUKernel )       ( void *, SlaveVP * ); //used as task birth Fn
    3.21 +typedef void (*DKUSerialKernel ) ( void *, SlaveVP * ); //used as task birth Fn
    3.22 +typedef void (*DKUDivider )      ( DKUPiece * ); 
    3.23 +typedef void (*DKUUndivider )    ( DKUPiece * );
    3.24 +
    3.25 +typedef DKUPiece *  (*DKURootPieceMaker) ( void *, DKUInstance * ); 
    3.26 +
    3.27 +struct _DKUInstance
    3.28 + { 
    3.29 +   DKURootPieceMaker rootPieceMaker;
    3.30 +   DKUKernel         kernel;
    3.31 +   DKUSerialKernel   serialKernel;
    3.32 +   DKUDivider        divider;
    3.33 +   DKUUndivider      undivider;
    3.34 + };
    3.35 +
    3.36 +struct _DKUPiece
    3.37 + {
    3.38 +   void        *payload;
    3.39 +   DKUPiece    *parent;
    3.40 +   DKUPiece   **children;
    3.41 +   int32        numChildren;
    3.42 +   int32        numUnfinishedChildren;
    3.43 +   DKUInstance *dkuInstance;   //to get kernel and undivider
    3.44 +   void        *undividerInfo; //divider communicates to undivider
    3.45 +   SlaveVP     *waitingVP;
    3.46 +   bool32       wasRecursivelyDivided;
    3.47 + };
    3.48 + 
    3.49 +
    3.50 +   
    3.51 +   
    3.52 +   
    3.53 +   
    3.54 +   
    3.55  
    3.56  /*WARNING: assembly hard-codes position of endInstrAddr as first field
    3.57   */
    3.58 @@ -86,6 +125,46 @@
    3.59  void
    3.60  PRServ__end_transaction( int32 transactionID, SlaveVP *animSlv );
    3.61  
    3.62 +//==============================  DKU  =============================
    3.63 +DKUInstance *
    3.64 +PRServ__DKU_make_empty_DKU_instance( SlaveVP *animSlv );
    3.65 +
    3.66 +DKUPiece *
    3.67 +PRServ__DKU_make_empty_DKU_piece();
    3.68 +
    3.69 +DKUPiece *
    3.70 +PRServ__DKU_make_child_piece_from( pieceToDivide );
    3.71 +
    3.72 +void
    3.73 +PRServ__DKU_set_root_piece_maker( DKUInstance *dkuInstance, 
    3.74 +                                  DKURootPieceMaker rootPieceMakerFn, 
    3.75 +                                  SlaveVP *animSlv );
    3.76 +void
    3.77 +PRServ__DKU_set_kernel( DKUInstance *dkuInstance, 
    3.78 +                        DKUKernel kernelFn, 
    3.79 +                        SlaveVP *animSlv );
    3.80 +void
    3.81 +PRServ__DKU_set_serial_kernel( DKUInstance *dkuInstance, 
    3.82 +                               DKUSerialKernel serialKernelFn, 
    3.83 +                               SlaveVP *animSlv );
    3.84 +void
    3.85 +PRServ__DKU_set_divider( DKUInstance *dkuInstance, 
    3.86 +                         DKUDivider dividerFn, 
    3.87 +                         SlaveVP *animSlv );
    3.88 +void
    3.89 +PRServ__DKU_set_undivider( DKUInstance *dkuInstance, 
    3.90 +                           DKUUndivider undividerFn, 
    3.91 +                           SlaveVP *animSlv );
    3.92 +DKUPiece *
    3.93 +PRServ__DKU_make_root_piece( DKUInstance *dkuInstance, 
    3.94 +                             void *data, 
    3.95 +                             SlaveVP *animSlv );
    3.96 +void
    3.97 +PRServ__DKU_perform_work_on( DKUPiece *rootPiece, 
    3.98 +                             SlaveVP *animSlv );
    3.99 +void
   3.100 +PRServ__DKU_wait_for_result_to_be_complete( DKUPiece *rootPiece, 
   3.101 +                                            SlaveVP  *animSlv );
   3.102  
   3.103  //===========================================================================
   3.104  #endif	/* _PRServ_H */