From 3883ef834294d1e85156c4ba9a7293efc4c409c0 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Mon, 14 Sep 2015 17:39:07 -0400 Subject: [PATCH] fixes for mac --- .cproject | 147 +++++++++--------- .gitignore | 6 +- .project | 2 +- CMakeLists.txt | 4 +- ...launch => Project3-CUDA-Path-Tracer.launch | 5 +- src/intersections.h | 2 +- src/pathtrace.cu | 2 +- 7 files changed, 86 insertions(+), 82 deletions(-) rename cis565_path_tracer.launch => Project3-CUDA-Path-Tracer.launch (82%) diff --git a/.cproject b/.cproject index c89050d..69419af 100644 --- a/.cproject +++ b/.cproject @@ -1,8 +1,10 @@ - + + + - - + + @@ -17,26 +19,26 @@ - - - - - - - - - + + @@ -61,26 +63,26 @@ - - - - - - - - - + + @@ -105,26 +107,26 @@ - - - - - - - - - + + @@ -149,26 +151,26 @@ - - - - - - - - + @@ -187,7 +189,10 @@ - + + + + diff --git a/.gitignore b/.gitignore index 309c26d..89942d9 100644 --- a/.gitignore +++ b/.gitignore @@ -507,16 +507,16 @@ local.properties .loadpath # Eclipse Core -.project +#.project # External tool builders .externalToolBuilders/ # Locally stored "Eclipse launch configurations" -*.launch +#*.launch # CDT-specific -.cproject +#.cproject # JDT-specific (Eclipse Java Development Tools) .classpath diff --git a/.project b/.project index 648c60a..f7a36d9 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - cis565_path_tracer + Project3-CUDA-Path-Tracer diff --git a/CMakeLists.txt b/CMakeLists.txt index 4101fed..76a65a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CUDA_PROPAGATE_HOST_FLAGS OFF) endif() -add_subdirectory(stream_compaction) +#add_subdirectory(stream_compaction) # TODO: uncomment if using your stream compaction add_subdirectory(src) cuda_add_executable(${CMAKE_PROJECT_NAME} @@ -77,7 +77,7 @@ cuda_add_executable(${CMAKE_PROJECT_NAME} target_link_libraries(${CMAKE_PROJECT_NAME} src - stream_compaction + #stream_compaction # TODO: uncomment if using your stream compaction ${CORELIBS} ) diff --git a/cis565_path_tracer.launch b/Project3-CUDA-Path-Tracer.launch similarity index 82% rename from cis565_path_tracer.launch rename to Project3-CUDA-Path-Tracer.launch index 08ac79d..0222434 100644 --- a/cis565_path_tracer.launch +++ b/Project3-CUDA-Path-Tracer.launch @@ -8,16 +8,15 @@ - + - + - diff --git a/src/intersections.h b/src/intersections.h index 25f64c2..e5b668f 100644 --- a/src/intersections.h +++ b/src/intersections.h @@ -8,7 +8,7 @@ /** * Handy-dandy hash function that provides seeds for random number generation. */ -__host__ __device__ inline unsigned int hash(unsigned int a) { +__host__ __device__ inline unsigned int utilhash(unsigned int a) { a = (a + 0x7ed55d16) + (a << 12); a = (a ^ 0xc761c23c) ^ (a >> 19); a = (a + 0x165667b1) + (a << 5); diff --git a/src/pathtrace.cu b/src/pathtrace.cu index 98835b0..4569e2f 100644 --- a/src/pathtrace.cu +++ b/src/pathtrace.cu @@ -32,7 +32,7 @@ void checkCUDAErrorFn(const char *msg, const char *file, int line) { __host__ __device__ thrust::default_random_engine random_engine( int iter, int index = 0, int depth = 0) { - return thrust::default_random_engine(hash((index + 1) * iter) ^ hash(depth)); + return thrust::default_random_engine(utilhash((index + 1) * iter) ^ utilhash(depth)); } //Kernel that writes the image to the OpenGL PBO directly.