Mercurial > hg > Game > Cerium
changeset 1817:b0376e1c51e9 draft
use get_input & get_output
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 13 Dec 2013 05:18:58 +0900 |
parents | 6118e0b77d74 |
children | 658c78f15992 |
files | example/fft/ppe/bitReverse.cc example/fft/ppe/butterfly.cc example/fft/ppe/highPassFilter.cc example/fft/ppe/norm.cc example/fft/ppe/spinFact.cc example/fft/ppe/transpose.cc |
diffstat | 6 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/example/fft/ppe/bitReverse.cc Fri Dec 13 05:13:15 2013 +0900 +++ b/example/fft/ppe/bitReverse.cc Fri Dec 13 05:18:58 2013 +0900 @@ -11,8 +11,8 @@ static int bitReverse(SchedTask* s, void* rbuf, void* wbuf) { - cl_float2* src = (cl_float2*)s->get_inputAddr(0); - cl_float2* dst = (cl_float2*)s->get_outputAddr(0); + cl_float2* src = (cl_float2*)s->get_input(rbuf,0); + cl_float2* dst = (cl_float2*)s->get_output(wbuf,0); unsigned long gid = s->x; // (unsigned long)s->get_param(0); unsigned long nid = s->y; // (unsigned long)s->get_param(1);
--- a/example/fft/ppe/butterfly.cc Fri Dec 13 05:13:15 2013 +0900 +++ b/example/fft/ppe/butterfly.cc Fri Dec 13 05:18:58 2013 +0900 @@ -10,10 +10,10 @@ static int butterfly(SchedTask* s,void* rbuf,void* wbuf) { - cl_float2* x_in = (cl_float2*)s->get_inputAddr(0); - cl_float2* w = (cl_float2*)s->get_inputAddr(1); + cl_float2* x_in = (cl_float2*)s->get_input(rbuf,0); + cl_float2* w = (cl_float2*)s->get_input(rbuf,1); - cl_float2* x_out = (cl_float2*)s->get_outputAddr(0); + cl_float2* x_out = (cl_float2*)s->get_output(wbuf,0); unsigned long gid = s->x; // (unsigned long)s->get_param(0); unsigned long nid = s->y; // (unsigned long)s->get_param(1);
--- a/example/fft/ppe/highPassFilter.cc Fri Dec 13 05:13:15 2013 +0900 +++ b/example/fft/ppe/highPassFilter.cc Fri Dec 13 05:18:58 2013 +0900 @@ -10,9 +10,9 @@ static int highPassFilter(SchedTask* s,void* rbuf,void* wbuf) { - cl_float2* in = (cl_float2*)s->get_inputAddr(0); + cl_float2* in = (cl_float2*)s->get_input(rbuf,0); - cl_float2* image = (cl_float2*)s->get_outputAddr(0); + cl_float2* image = (cl_float2*)s->get_output(wbuf,0); unsigned long xgid = s->x; // (unsigned long)s->get_param(0); unsigned long ygid = s->y; // (unsigned long)s->get_param(1);
--- a/example/fft/ppe/norm.cc Fri Dec 13 05:13:15 2013 +0900 +++ b/example/fft/ppe/norm.cc Fri Dec 13 05:18:58 2013 +0900 @@ -10,9 +10,9 @@ static int norm(SchedTask* s, void* rbuf,void* wbuf) { - cl_float2* in_x = (cl_float2*)s->get_inputAddr(0); + cl_float2* in_x = (cl_float2*)s->get_input(rbuf,0); - cl_float2* out_x = (cl_float2*)s->get_outputAddr(0); + cl_float2* out_x = (cl_float2*)s->get_output(wbuf,0); unsigned long gid = s->x; // (unsigned long)s->get_param(0); unsigned long nid = s->y; //(unsigned long)s->get_param(1);
--- a/example/fft/ppe/spinFact.cc Fri Dec 13 05:13:15 2013 +0900 +++ b/example/fft/ppe/spinFact.cc Fri Dec 13 05:18:58 2013 +0900 @@ -15,7 +15,7 @@ static int spinFact(SchedTask* s,void* rbuf,void* wbuf) { - cl_float2* w = (cl_float2*)s->get_outputAddr(0); + cl_float2* w = (cl_float2*)s->get_output(wbuf,0); unsigned long i = s->x; // (unsigned long)s->get_param(0);
--- a/example/fft/ppe/transpose.cc Fri Dec 13 05:13:15 2013 +0900 +++ b/example/fft/ppe/transpose.cc Fri Dec 13 05:18:58 2013 +0900 @@ -11,9 +11,9 @@ static int transpose(SchedTask* s,void* rbuf,void* wbuf) { - cl_float2* src = (cl_float2*)s->get_inputAddr(0); + cl_float2* src = (cl_float2*)s->get_input(rbuf,0); - cl_float2* dst = (cl_float2*)s->get_outputAddr(0); + cl_float2* dst = (cl_float2*)s->get_output(wbuf,0); unsigned long xgid = s->x; // (unsigned long)s->get_param(0); unsigned long ygid = s->y; // (unsigned long)s->get_param(1);