diff --git a/examples_cuda/deferred/Makefile b/examples_cuda/deferred/Makefile index 0a07176b..5225b563 100644 --- a/examples_cuda/deferred/Makefile +++ b/examples_cuda/deferred/Makefile @@ -1,7 +1,7 @@ EXAMPLE=deferred_shading -CPP_SRC=common.cpp main.cpp dynamic_c.cpp dynamic_cilk.cpp -ISPC_SRC=kernels.ispc +CPP_SRC=common.cpp main.cpp +ISPC_SRC=kernels1.ispc ISPC_IA_TARGETS=avx ISPC_FLAGS=--opt=fast-math diff --git a/examples_cuda/deferred/deferred.h b/examples_cuda/deferred/deferred.h index 485315a8..f82f485d 100644 --- a/examples_cuda/deferred/deferred.h +++ b/examples_cuda/deferred/deferred.h @@ -63,7 +63,7 @@ enum InputDataArraysEnum { #ifndef ISPC #include -#include "kernels_ispc.h" +#include "kernels1_ispc.h" #define ALIGNMENT_BYTES 64 diff --git a/examples_cuda/deferred/main.cpp b/examples_cuda/deferred/main.cpp index 1e4cee4d..dae0d4dc 100644 --- a/examples_cuda/deferred/main.cpp +++ b/examples_cuda/deferred/main.cpp @@ -56,7 +56,6 @@ #include #endif #include "deferred.h" -#include "kernels_ispc.h" #include "../timing.h" #include @@ -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); diff --git a/examples_cuda/deferred/main_cu.cpp b/examples_cuda/deferred/main_cu.cpp index ff308202..4cc483b4 100755 --- a/examples_cuda/deferred/main_cu.cpp +++ b/examples_cuda/deferred/main_cu.cpp @@ -55,8 +55,8 @@ #define WIN32_LEAN_AND_MEAN #include #endif +#include "kernels1_ispc.h" #include "deferred.h" -#include "kernels_ispc.h" #include "../timing.h" #include