changeset 2:a8a8c4193c9b

Close to final version -- getting there
author Some Random Person <seanhalle@yahoo.com>
date Thu, 24 May 2012 07:59:38 -0700
parents 9ad1a6186956
children 8e51f5dd849f
files VSs__Hello_World/SeedVP.c VSs__Hello_World/VSs__Hello_World.h
diffstat 2 files changed, 16 insertions(+), 73 deletions(-) [+]
line diff
     1.1 --- a/VSs__Hello_World/SeedVP.c	Wed May 23 14:24:18 2012 -0700
     1.2 +++ b/VSs__Hello_World/SeedVP.c	Thu May 24 07:59:38 2012 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - *  Copyright 2009 OpenSourceStewardshipFoundation.org
     1.6 + *  Copyright 2009 OpenSourceResearchInstitute.org
     1.7   *  Licensed under GNU General Public License version 2
     1.8   *
     1.9   * Author: seanhalle@yahoo.com
    1.10 @@ -11,15 +11,16 @@
    1.11  #include <string.h>
    1.12  #include "VSs__Hello_World.h"
    1.13  
    1.14 -void hello_world( void      *_params, SlaveVP *animPr )
    1.15 +void hello_world( void *_params, SlaveVP *animPr )
    1.16   { int32 i;
    1.17 + 
    1.18           DEBUG__printf( dbgAppFlow, "start hello_world");
    1.19  
    1.20     // create all the task types
    1.21     helloWorldTaskType = VMS_App__malloc( sizeof(VSsTaskType) );
    1.22     helloWorldTaskType->fn = &hello_world_task;
    1.23     helloWorldTaskType->numArgs = 2;
    1.24 -   helloWorldTaskType->argTypes = {NULL, IN};
    1.25 +   helloWorldTaskType->argTypes = &{NULL, IN};
    1.26     helloWorldTaskType->argSizes = {sizeof(int), 16*16*sizeof(float)};
    1.27  
    1.28     HelloWorldArgs args; //allocate on stack, VSs copies internally
    1.29 @@ -27,8 +28,8 @@
    1.30     for( i = 0; i < 5; i++ )
    1.31      {
    1.32        args.dummy1 = i;
    1.33 -      args.dummy2 = VMS_App__malloc()
    1.34 -      VSs__submit_task( VSsTaskType helloWorldTaskType, &args );
    1.35 +      args.dummy2 = VMS_App__malloc();
    1.36 +      VSs__submit_task( helloWorldTaskType, &args );
    1.37  	}
    1.38   }
    1.39  
     2.1 --- a/VSs__Hello_World/VSs__Hello_World.h	Wed May 23 14:24:18 2012 -0700
     2.2 +++ b/VSs__Hello_World/VSs__Hello_World.h	Thu May 24 07:59:38 2012 -0700
     2.3 @@ -8,87 +8,29 @@
     2.4  
     2.5  #include <stdio.h>
     2.6  
     2.7 -#include "SSR_impl/SSR.h"
     2.8 -#include "../Matrix_Mult.h"
     2.9 +#include "VSs_impl/VSs.h"
    2.10  
    2.11  
    2.12  //===============================  Defines  ==============================
    2.13 -#define ROWS_IN_BLOCK 32
    2.14 -#define COLS_IN_BLOCK 32
    2.15 -#define VEC_IN_BLOCK  32
    2.16 -
    2.17 -#define copyMatrixSingleton 1
    2.18 -#define copyTransposeSingleton 2
    2.19  
    2.20  //==============================  Structures  ==============================
    2.21 -typedef struct
    2.22 - {
    2.23 -   Matrix *leftMatrix;
    2.24 -   Matrix *rightMatrix;
    2.25 -   Matrix *resultMatrix;
    2.26 - }
    2.27 -DividerParams;
    2.28  
    2.29  typedef struct
    2.30 - {
    2.31 -   SlaveVP *dividerPr;
    2.32 -   int numRows;
    2.33 -   int numCols;
    2.34 -   int numSubMatrixPairs;
    2.35 -   float32 *resultArray;
    2.36 + { int32  dummy1;
    2.37 +   int32 *dummy2;
    2.38   }
    2.39 -ResultsParams;
    2.40 -
    2.41 -typedef struct
    2.42 - { int32    numRows;
    2.43 -   int32    numCols;
    2.44 -   Matrix  *origMatrix;
    2.45 -   int32    origStartRow;
    2.46 -   int32    origStartCol;
    2.47 -   int32    alreadyCopied;
    2.48 -   int32    numUsesLeft; //have update via message to avoid multiple writers
    2.49 -   SSRSingleton *copySingleton;
    2.50 -   SSRSingleton *copyTransSingleton;
    2.51 -   float32 *array;  //2D, but dynamically sized, so use addr arith
    2.52 - }
    2.53 -SubMatrix;
    2.54 -
    2.55 -typedef struct
    2.56 - { SlaveVP   *resultPr;
    2.57 -   SubMatrix *leftSubMatrix;
    2.58 -   SubMatrix *rightSubMatrix;
    2.59 -   float32   *partialResultArray;
    2.60 - }
    2.61 -SMPairParams;
    2.62 -
    2.63 -typedef struct
    2.64 - { int32    numVals;
    2.65 -   int32   *startVals;
    2.66 - }
    2.67 -SlicingStruc;
    2.68 -
    2.69 -typedef struct
    2.70 - {
    2.71 -   SlicingStruc *leftRowSlices;
    2.72 -   SlicingStruc *vecSlices;
    2.73 -   SlicingStruc *rightColSlices;
    2.74 - }
    2.75 -SlicingStrucCarrier;
    2.76 -
    2.77 -enum MMMsgType
    2.78 - {
    2.79 -   RESULTS_MSG = 1
    2.80 - };
    2.81 +HelloWorldArgs;
    2.82  
    2.83  //============================= Processor Functions =========================
    2.84 -void divideWorkIntoSubMatrixPairProcrs( void *data, SlaveVP *animatingPr );
    2.85 -void calcSubMatrixProduct(        void *data, SlaveVP *animatingPr );
    2.86 -void gatherResults(     void *data, SlaveVP *animatingPr );
    2.87 +void hello_world(      void *data, SlaveVP *animatingPr ); //seed VP function
    2.88 +void hello_world_task( void *data, SlaveVP *animatingPr );
    2.89  
    2.90  
    2.91  //================================ Entry Point ==============================
    2.92 -Matrix *
    2.93 -multiplyTheseMatrices( Matrix *leftMatrix, Matrix *rightMatrix );
    2.94 +void
    2.95 +VSs__Hello_World( );
    2.96  
    2.97 +//================================ Global Vars ==============================
    2.98 +VSsTaskType *helloWorldTaskType;
    2.99  
   2.100  #endif /*_SSR_MATRIX_MULT_H_*/