Mercurial > hg > Game > Cerium
diff example/fft/task_init.cc @ 1551:57317332f6ef draft
create fft example
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 17 Feb 2013 12:59:12 +0900 |
parents | |
children | 21ddbc06dcde |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example/fft/task_init.cc Sun Feb 17 12:59:12 2013 +0900 @@ -0,0 +1,33 @@ +#include "Func.h" +#include "Scheduler.h" +#include "GpuScheduler.h" + +#ifndef __CERIUM_GPU__ +SchedExternTask(spinfact); +SchedExternTask(bitreverse); +SchedExternTask(normalization); +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(TRANSEPOSE, "gpu/fft.cl", "transpose"); + GpuSchedRegister(HIGH_PASS_FILTER, "gpu/fft.cl", "highPassFilter"); +#else + SchedRegisterTask(QUICK_SORT, QuickSort); + SchedRegisterTask(SPIN_FACT,spinFact); + SchedRegisterTask(BIT_REVERSE, bitReverse); + SchedRegisterTask(NORMALIZATION, norm); + SchedRegisterTask(BUTTERFLY, butterfly); + SchedRegisterTask(TRANSEPOSE, transpose); + SchedRegisterTask(HIGH_PASS_FILTER, highPassFilter); +#endif +}