# HG changeset patch # User Sean Halle # Date 1339030858 25200 # Node ID 6643a6f4705087018fc191fba1ee577f42152d40 # Parent 8e51f5dd849fd580c9596759b97930fc311021b6 First working version diff -r 8e51f5dd849f -r 6643a6f47050 VSs__Hello_World/EntryPoint.c --- a/VSs__Hello_World/EntryPoint.c Wed May 30 15:04:01 2012 -0700 +++ b/VSs__Hello_World/EntryPoint.c Wed Jun 06 18:00:58 2012 -0700 @@ -8,7 +8,7 @@ #include -#include "SSR_Matrix_Mult.h" +#include "VSs__Hello_World.h" diff -r 8e51f5dd849f -r 6643a6f47050 VSs__Hello_World/SeedVP.c --- a/VSs__Hello_World/SeedVP.c Wed May 30 15:04:01 2012 -0700 +++ b/VSs__Hello_World/SeedVP.c Wed Jun 06 18:00:58 2012 -0700 @@ -11,11 +11,12 @@ #include #include "VSs__Hello_World.h" -/*Global vars are part of the hello world task type.. NULL means not cntld*/ -int32 helloWorldArgTypes[2] = {NULL, IN}; -int32 helloWorldArgSizes[2] = {sizeof(int32), 16*16*sizeof(float)}; +/*Global vars are part of the hello world task type.. NULL means not cntld + ctld args MUST always be the first ones in the array*/ +int32 helloWorldArgTypes[2] = {IN, (int32)NULL}; +int32 helloWorldArgSizes[2] = {16*16*sizeof(float), sizeof(int32)}; -void hello_world( void *_params, SlaveVP *animPr ) +void hello_world( void *_params, SlaveVP *animSlv ) { int32 i; DEBUG__printf( dbgAppFlow, "start hello_world"); @@ -33,9 +34,12 @@ for( i = 0; i < 5; i++ ) { - args.dummy1 = VMS_App__malloc( 4 ); + args.dummy1 = VMS_App__malloc( helloWorldTaskType->argSizes[0] ); args.dummy2 = i; - VSs__submit_task( helloWorldTaskType, &args, animPr ); - } + VSs__submit_task( helloWorldTaskType, &args, animSlv ); + } +// VSs__wait_for_all_tasks_to_complete(); +// VSs__shutdown( animSlv ); + VSs__dissipate_slave( animSlv ); } diff -r 8e51f5dd849f -r 6643a6f47050 VSs__Hello_World/Task.c --- a/VSs__Hello_World/Task.c Wed May 30 15:04:01 2012 -0700 +++ b/VSs__Hello_World/Task.c Wed Jun 06 18:00:58 2012 -0700 @@ -16,7 +16,8 @@ args = (HelloWorldArgs *)_args; - printf("Hello World: %d, %d", args->dummy1, args->dummy2); + printf("Hello World: %llu, %d", (uint64)args->dummy1, args->dummy2); + fflush(stdout); VSs__end_task( animSlv ); } diff -r 8e51f5dd849f -r 6643a6f47050 VSs__Hello_World/VSs__Hello_World.h --- a/VSs__Hello_World/VSs__Hello_World.h Wed May 30 15:04:01 2012 -0700 +++ b/VSs__Hello_World/VSs__Hello_World.h Wed Jun 06 18:00:58 2012 -0700 @@ -23,8 +23,8 @@ HelloWorldArgs; //============================= Processor Functions ========================= -void hello_world( void *data, SlaveVP *animatingPr ); //seed VP function -void hello_world_task( void *data, SlaveVP *animatingPr ); +void hello_world( void *data, SlaveVP *animatingSlv ); //seed VP function +void hello_world_task( void *data, SlaveVP *animatingSlv ); //================================ Entry Point ============================== diff -r 8e51f5dd849f -r 6643a6f47050 main.c --- a/main.c Wed May 30 15:04:01 2012 -0700 +++ b/main.c Wed Jun 06 18:00:58 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 20012 OpenSourceResearchInstitute.org + * Copyright 2012 OpenSourceResearchInstitute.org * Licensed under GNU General Public License version 2 * * author seanhalle@yahoo.com