Mercurial > hg > Game > Cerium
changeset 1712:c8c45e5b4a1c draft
add
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Oct 2013 18:04:49 +0900 |
parents | 83e36a0a08ef |
children | 7cb9f93aa51f |
files | example/fft/output.pgm example/fft/task_init.cc |
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:04:49 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 +}