+using kernels1 in deferred
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ enum InputDataArraysEnum {
|
||||
#ifndef ISPC
|
||||
|
||||
#include <stdint.h>
|
||||
#include "kernels_ispc.h"
|
||||
#include "kernels1_ispc.h"
|
||||
|
||||
#define ALIGNMENT_BYTES 64
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include "kernels1_ispc.h"
|
||||
#include "deferred.h"
|
||||
#include "kernels_ispc.h"
|
||||
#include "../timing.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
Reference in New Issue
Block a user