annotate Renderer/Engine/task/DataLoad.cc @ 678:e201be3f6897

add Load light info for some spe
author yutaka@henri.cr.ie.u-ryukyu.ac.jp
date Sun, 06 Dec 2009 07:40:26 +0900
parents
children 3c05b9e518ac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
678
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 #include <stdio.h>
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
2 #include <string.h>
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
3 #include "DataLoad.h"
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
4 #include "Func.h"
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
5
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
6 /* これは必須 */
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
7 SchedDefineTask(DataLoad);
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
8
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
9 static int
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
10 run(SchedTask *s, void *rbuf, void *wbuf)
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
11 {
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
12
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
13 int length = (int)s->get_param(0);
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
14 int load_id = (int)s->get_param(1);
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
15
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
16 //printf("size %d",sizeof(float)*length);
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
17
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
18 s->global_alloc(load_id, sizeof(float)*length);
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
19
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
20 //MemList *ml = s->createMemList(length,length);
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
21 //s->global_set(load_id, (void *)ml);
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
22
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
23 return 0;
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
24 }
e201be3f6897 add Load light info for some spe
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
25