# HG changeset patch # User Sean Halle # Date 1338415441 25200 # Node ID 8e51f5dd849fd580c9596759b97930fc311021b6 # Parent a8a8c4193c9b78e1bea68a9a6ef7c6f5e6a2ca80 candidate for final -- about to begin debugging diff -r a8a8c4193c9b -r 8e51f5dd849f VSs__Hello_World/EntryPoint.c --- a/VSs__Hello_World/EntryPoint.c Thu May 24 07:59:38 2012 -0700 +++ b/VSs__Hello_World/EntryPoint.c Wed May 30 15:04:01 2012 -0700 @@ -21,7 +21,7 @@ * functions do: *1) it creates the params for the seed processor, from the * parameters passed into the entry-point function - *2) it calls SSR__create_seed_procr_and_do_work + *2) it calls SSR__create_seed_slave_and_do_work *3) it gets the return value from the params struc, frees the params struc, * and returns the value from the function * @@ -31,7 +31,7 @@ { //create seed processor, start doing the work, and wait till done //This function is the "border crossing" between normal code and SSR - VSs__create_seed_procr_and_do_work( &hello_world, + VSs__create_seed_slave_and_do_work( &hello_world, NULL ); return; diff -r a8a8c4193c9b -r 8e51f5dd849f VSs__Hello_World/SeedVP.c --- a/VSs__Hello_World/SeedVP.c Thu May 24 07:59:38 2012 -0700 +++ b/VSs__Hello_World/SeedVP.c Wed May 30 15:04:01 2012 -0700 @@ -11,6 +11,10 @@ #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)}; + void hello_world( void *_params, SlaveVP *animPr ) { int32 i; @@ -19,17 +23,19 @@ // create all the task types helloWorldTaskType = VMS_App__malloc( sizeof(VSsTaskType) ); helloWorldTaskType->fn = &hello_world_task; - helloWorldTaskType->numArgs = 2; - helloWorldTaskType->argTypes = &{NULL, IN}; - helloWorldTaskType->argSizes = {sizeof(int), 16*16*sizeof(float)}; + helloWorldTaskType->numCtldArgs = 1; + helloWorldTaskType->numTotalArgs = 2; + helloWorldTaskType->sizeOfArgs = sizeof(HelloWorldArgs); + helloWorldTaskType->argTypes = helloWorldArgTypes; + helloWorldTaskType->argSizes = helloWorldArgSizes; HelloWorldArgs args; //allocate on stack, VSs copies internally for( i = 0; i < 5; i++ ) { - args.dummy1 = i; - args.dummy2 = VMS_App__malloc(); - VSs__submit_task( helloWorldTaskType, &args ); + args.dummy1 = VMS_App__malloc( 4 ); + args.dummy2 = i; + VSs__submit_task( helloWorldTaskType, &args, animPr ); } } diff -r a8a8c4193c9b -r 8e51f5dd849f VSs__Hello_World/Task.c --- a/VSs__Hello_World/Task.c Thu May 24 07:59:38 2012 -0700 +++ b/VSs__Hello_World/Task.c Wed May 30 15:04:01 2012 -0700 @@ -11,11 +11,13 @@ #include #include "VSs__Hello_World.h" -void hello_world_task( void *_args, SlaveVP *animPr ) +void hello_world_task( void *_args, SlaveVP *animSlv ) { HelloWorldArgs *args; args = (HelloWorldArgs *)_args; - printf("Hello World: %d, %f", args->dummy1, args->dummy2); + printf("Hello World: %d, %d", args->dummy1, args->dummy2); + + VSs__end_task( animSlv ); } diff -r a8a8c4193c9b -r 8e51f5dd849f VSs__Hello_World/VSs__Hello_World.h --- a/VSs__Hello_World/VSs__Hello_World.h Thu May 24 07:59:38 2012 -0700 +++ b/VSs__Hello_World/VSs__Hello_World.h Wed May 30 15:04:01 2012 -0700 @@ -15,9 +15,10 @@ //============================== Structures ============================== +//NOTE: controlled args must come first, accessible as array of ptrs typedef struct - { int32 dummy1; - int32 *dummy2; + { int32 *dummy1; //This is a controlled arg -- VSs uses to calc depenencies + int32 dummy2; //This is a normal arg, ignored by VSs } HelloWorldArgs;