view PRDSL__Test_App/Task.c @ 0:1cb25216938b

Initial add -- working
author Sean Halle <seanhalle@yahoo.com>
date Thu, 19 Sep 2013 18:08:07 -0700
parents
children
line source
1 /*
2 * Copyright 2009 OpenSourceResearchInstitute.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 *
7 */
10 #include <math.h>
11 #include <string.h>
12 #include "PRDSL__Test_App.h"
14 int
15 square( int x )
16 { return x*x;
17 }
19 void task_birthFn( void *_params, SlaveVP *animVP )
20 { int32 i;
21 TaskParams *params = (TaskParams *)_params;
22 int32 *data = params->data;
23 DEBUG__printf(TRUE, "Task %d", params->start);
24 for( i=params->start; i < params->end; ++i )
25 { data[i] = square(i);
26 }
27 PRDSL__end_task( animVP );
28 }