Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VSs > VSs__Hello_World__LangDev
changeset 4:6643a6f47050
First working version
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Wed, 06 Jun 2012 18:00:58 -0700 |
| parents | 8e51f5dd849f |
| children | 8b7761919283 |
| files | VSs__Hello_World/EntryPoint.c VSs__Hello_World/SeedVP.c VSs__Hello_World/Task.c VSs__Hello_World/VSs__Hello_World.h main.c |
| diffstat | 5 files changed, 17 insertions(+), 12 deletions(-) [+] |
line diff
1.1 --- a/VSs__Hello_World/EntryPoint.c Wed May 30 15:04:01 2012 -0700 1.2 +++ b/VSs__Hello_World/EntryPoint.c Wed Jun 06 18:00:58 2012 -0700 1.3 @@ -8,7 +8,7 @@ 1.4 1.5 #include <math.h> 1.6 1.7 -#include "SSR_Matrix_Mult.h" 1.8 +#include "VSs__Hello_World.h" 1.9 1.10 1.11
2.1 --- a/VSs__Hello_World/SeedVP.c Wed May 30 15:04:01 2012 -0700 2.2 +++ b/VSs__Hello_World/SeedVP.c Wed Jun 06 18:00:58 2012 -0700 2.3 @@ -11,11 +11,12 @@ 2.4 #include <string.h> 2.5 #include "VSs__Hello_World.h" 2.6 2.7 -/*Global vars are part of the hello world task type.. NULL means not cntld*/ 2.8 -int32 helloWorldArgTypes[2] = {NULL, IN}; 2.9 -int32 helloWorldArgSizes[2] = {sizeof(int32), 16*16*sizeof(float)}; 2.10 +/*Global vars are part of the hello world task type.. NULL means not cntld 2.11 + ctld args MUST always be the first ones in the array*/ 2.12 +int32 helloWorldArgTypes[2] = {IN, (int32)NULL}; 2.13 +int32 helloWorldArgSizes[2] = {16*16*sizeof(float), sizeof(int32)}; 2.14 2.15 -void hello_world( void *_params, SlaveVP *animPr ) 2.16 +void hello_world( void *_params, SlaveVP *animSlv ) 2.17 { int32 i; 2.18 2.19 DEBUG__printf( dbgAppFlow, "start hello_world"); 2.20 @@ -33,9 +34,12 @@ 2.21 2.22 for( i = 0; i < 5; i++ ) 2.23 { 2.24 - args.dummy1 = VMS_App__malloc( 4 ); 2.25 + args.dummy1 = VMS_App__malloc( helloWorldTaskType->argSizes[0] ); 2.26 args.dummy2 = i; 2.27 - VSs__submit_task( helloWorldTaskType, &args, animPr ); 2.28 - } 2.29 + VSs__submit_task( helloWorldTaskType, &args, animSlv ); 2.30 + } 2.31 +// VSs__wait_for_all_tasks_to_complete(); 2.32 +// VSs__shutdown( animSlv ); 2.33 + VSs__dissipate_slave( animSlv ); 2.34 } 2.35
3.1 --- a/VSs__Hello_World/Task.c Wed May 30 15:04:01 2012 -0700 3.2 +++ b/VSs__Hello_World/Task.c Wed Jun 06 18:00:58 2012 -0700 3.3 @@ -16,7 +16,8 @@ 3.4 3.5 args = (HelloWorldArgs *)_args; 3.6 3.7 - printf("Hello World: %d, %d", args->dummy1, args->dummy2); 3.8 + printf("Hello World: %llu, %d", (uint64)args->dummy1, args->dummy2); 3.9 + fflush(stdout); 3.10 3.11 VSs__end_task( animSlv ); 3.12 }
4.1 --- a/VSs__Hello_World/VSs__Hello_World.h Wed May 30 15:04:01 2012 -0700 4.2 +++ b/VSs__Hello_World/VSs__Hello_World.h Wed Jun 06 18:00:58 2012 -0700 4.3 @@ -23,8 +23,8 @@ 4.4 HelloWorldArgs; 4.5 4.6 //============================= Processor Functions ========================= 4.7 -void hello_world( void *data, SlaveVP *animatingPr ); //seed VP function 4.8 -void hello_world_task( void *data, SlaveVP *animatingPr ); 4.9 +void hello_world( void *data, SlaveVP *animatingSlv ); //seed VP function 4.10 +void hello_world_task( void *data, SlaveVP *animatingSlv ); 4.11 4.12 4.13 //================================ Entry Point ==============================
5.1 --- a/main.c Wed May 30 15:04:01 2012 -0700 5.2 +++ b/main.c Wed Jun 06 18:00:58 2012 -0700 5.3 @@ -1,5 +1,5 @@ 5.4 /* 5.5 - * Copyright 20012 OpenSourceResearchInstitute.org 5.6 + * Copyright 2012 OpenSourceResearchInstitute.org 5.7 * Licensed under GNU General Public License version 2 5.8 * 5.9 * author seanhalle@yahoo.com
