# HG changeset patch # User Some Random Person # Date 1337871578 25200 # Node ID a8a8c4193c9b78e1bea68a9a6ef7c6f5e6a2ca80 # Parent 9ad1a61869562e576a245c59ec28424bac2e6419 Close to final version -- getting there diff -r 9ad1a6186956 -r a8a8c4193c9b VSs__Hello_World/SeedVP.c --- a/VSs__Hello_World/SeedVP.c Wed May 23 14:24:18 2012 -0700 +++ b/VSs__Hello_World/SeedVP.c Thu May 24 07:59:38 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 2009 OpenSourceStewardshipFoundation.org + * Copyright 2009 OpenSourceResearchInstitute.org * Licensed under GNU General Public License version 2 * * Author: seanhalle@yahoo.com @@ -11,15 +11,16 @@ #include #include "VSs__Hello_World.h" -void hello_world( void *_params, SlaveVP *animPr ) +void hello_world( void *_params, SlaveVP *animPr ) { int32 i; + DEBUG__printf( dbgAppFlow, "start hello_world"); // create all the task types helloWorldTaskType = VMS_App__malloc( sizeof(VSsTaskType) ); helloWorldTaskType->fn = &hello_world_task; helloWorldTaskType->numArgs = 2; - helloWorldTaskType->argTypes = {NULL, IN}; + helloWorldTaskType->argTypes = &{NULL, IN}; helloWorldTaskType->argSizes = {sizeof(int), 16*16*sizeof(float)}; HelloWorldArgs args; //allocate on stack, VSs copies internally @@ -27,8 +28,8 @@ for( i = 0; i < 5; i++ ) { args.dummy1 = i; - args.dummy2 = VMS_App__malloc() - VSs__submit_task( VSsTaskType helloWorldTaskType, &args ); + args.dummy2 = VMS_App__malloc(); + VSs__submit_task( helloWorldTaskType, &args ); } } diff -r 9ad1a6186956 -r a8a8c4193c9b VSs__Hello_World/VSs__Hello_World.h --- a/VSs__Hello_World/VSs__Hello_World.h Wed May 23 14:24:18 2012 -0700 +++ b/VSs__Hello_World/VSs__Hello_World.h Thu May 24 07:59:38 2012 -0700 @@ -8,87 +8,29 @@ #include -#include "SSR_impl/SSR.h" -#include "../Matrix_Mult.h" +#include "VSs_impl/VSs.h" //=============================== Defines ============================== -#define ROWS_IN_BLOCK 32 -#define COLS_IN_BLOCK 32 -#define VEC_IN_BLOCK 32 - -#define copyMatrixSingleton 1 -#define copyTransposeSingleton 2 //============================== Structures ============================== -typedef struct - { - Matrix *leftMatrix; - Matrix *rightMatrix; - Matrix *resultMatrix; - } -DividerParams; typedef struct - { - SlaveVP *dividerPr; - int numRows; - int numCols; - int numSubMatrixPairs; - float32 *resultArray; + { int32 dummy1; + int32 *dummy2; } -ResultsParams; - -typedef struct - { int32 numRows; - int32 numCols; - Matrix *origMatrix; - int32 origStartRow; - int32 origStartCol; - int32 alreadyCopied; - int32 numUsesLeft; //have update via message to avoid multiple writers - SSRSingleton *copySingleton; - SSRSingleton *copyTransSingleton; - float32 *array; //2D, but dynamically sized, so use addr arith - } -SubMatrix; - -typedef struct - { SlaveVP *resultPr; - SubMatrix *leftSubMatrix; - SubMatrix *rightSubMatrix; - float32 *partialResultArray; - } -SMPairParams; - -typedef struct - { int32 numVals; - int32 *startVals; - } -SlicingStruc; - -typedef struct - { - SlicingStruc *leftRowSlices; - SlicingStruc *vecSlices; - SlicingStruc *rightColSlices; - } -SlicingStrucCarrier; - -enum MMMsgType - { - RESULTS_MSG = 1 - }; +HelloWorldArgs; //============================= Processor Functions ========================= -void divideWorkIntoSubMatrixPairProcrs( void *data, SlaveVP *animatingPr ); -void calcSubMatrixProduct( void *data, SlaveVP *animatingPr ); -void gatherResults( void *data, SlaveVP *animatingPr ); +void hello_world( void *data, SlaveVP *animatingPr ); //seed VP function +void hello_world_task( void *data, SlaveVP *animatingPr ); //================================ Entry Point ============================== -Matrix * -multiplyTheseMatrices( Matrix *leftMatrix, Matrix *rightMatrix ); +void +VSs__Hello_World( ); +//================================ Global Vars ============================== +VSsTaskType *helloWorldTaskType; #endif /*_SSR_MATRIX_MULT_H_*/