Mercurial > hg > Game > Cerium
changeset 1714:7cb9f93aa51f draft
merge
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Oct 2013 18:39:30 +0900 |
parents | 4dfcd6d74592 (current diff) c8c45e5b4a1c (diff) |
children | 996d216c837a |
files | example/fft/output.pgm |
diffstat | 2 files changed, 32 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example/fft/task_init.cc Tue Oct 08 18:39:30 2013 +0900 @@ -0,0 +1,32 @@ +#include "Func.h" +#include "Scheduler.h" +#include "GpuScheduler.h" + +#ifndef __CERIUM_GPU__ +SchedExternTask(spinFact); +SchedExternTask(bitReverse); +SchedExternTask(norm); +SchedExternTask(butterfly); +SchedExternTask(transpose); +SchedExternTask(highPassFilter); +#endif // not __CERIUM_GPU__ + +void +task_init(void) +{ +#ifdef __CERIUM_GPU__ + GpuSchedRegister(SPIN_FACT, "gpu/fft.cl", "spinFact"); + GpuSchedRegister(BIT_REVERSE, "gpu/fft.cl", "bitReverse"); + GpuSchedRegister(NORMALIZATION, "gpu/fft.cl", "norm"); + GpuSchedRegister(BUTTERFLY, "gpu/fft.cl", "butterfly"); + GpuSchedRegister(TRANSPOSE, "gpu/fft.cl", "transpose"); + GpuSchedRegister(HIGH_PASS_FILTER, "gpu/fft.cl", "highPassFilter"); +#else + SchedRegisterTask(SPIN_FACT,spinFact); + SchedRegisterTask(NORMALIZATION, norm); + SchedRegisterTask(BIT_REVERSE, bitReverse); + SchedRegisterTask(BUTTERFLY, butterfly); + SchedRegisterTask(TRANSPOSE, transpose); + SchedRegisterTask(HIGH_PASS_FILTER, highPassFilter); +#endif +}