Skip to content

Commit

Permalink
fixes for mac
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Sep 14, 2015
1 parent dfc4775 commit 3883ef8
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 82 deletions.
147 changes: 76 additions & 71 deletions .cproject

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>cis565_path_tracer</name>
<name>Project3-CUDA-Path-Tracer</name>
<comment></comment>
<projects>
</projects>
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="scenes/sphere.txt"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/cis565_path_tracer"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="cis565_path_tracer"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="Project3-CUDA-Path-Tracer"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/cis565_path_tracer"/>
<listEntry value="/Project3-CUDA-Path-Tracer"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#10;"/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
</launchConfiguration>
2 changes: 1 addition & 1 deletion src/intersections.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/pathtrace.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3883ef8

Please sign in to comment.