+using kernels1 in deferred
This commit is contained in:
@@ -56,7 +56,6 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include "deferred.h"
|
||||
#include "kernels_ispc.h"
|
||||
#include "../timing.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
@@ -89,10 +88,12 @@ int main(int argc, char** argv) {
|
||||
Framebuffer framebuffer(input->header.framebufferWidth,
|
||||
input->header.framebufferHeight);
|
||||
|
||||
#if 0
|
||||
InitDynamicC(input);
|
||||
#ifdef __cilk
|
||||
InitDynamicCilk(input);
|
||||
#endif // __cilk
|
||||
#endif
|
||||
|
||||
int nframes = 5;
|
||||
double ispcCycles = 1e30;
|
||||
@@ -100,7 +101,7 @@ int main(int argc, char** argv) {
|
||||
framebuffer.clear();
|
||||
const double t0 = rtc();
|
||||
for (int j = 0; j < nframes; ++j)
|
||||
ispc::RenderStatic(input->header, input->arrays,
|
||||
ispc::RenderStatic(&input->header, &input->arrays,
|
||||
VISUALIZE_LIGHT_COUNT,
|
||||
framebuffer.r, framebuffer.g, framebuffer.b);
|
||||
double mcycles = 1000*(rtc() - t0) / nframes;
|
||||
@@ -110,6 +111,8 @@ int main(int argc, char** argv) {
|
||||
"%d x %d image\n", ispcCycles,
|
||||
input->header.framebufferWidth, input->header.framebufferHeight);
|
||||
WriteFrame("deferred-ispc-static.ppm", input, framebuffer);
|
||||
return 0;
|
||||
#if 0
|
||||
|
||||
#ifdef __cilk
|
||||
double dynamicCilkCycles = 1e30;
|
||||
@@ -145,6 +148,7 @@ int main(int argc, char** argv) {
|
||||
#else
|
||||
printf("\t\t\t\t(%.2fx speedup from ISPC + tasks)\n", serialCycles/ispcCycles);
|
||||
#endif // __cilk
|
||||
#endif
|
||||
|
||||
DeleteInputData(input);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user