Skip to content

Commit

Permalink
Added nbody.h to MSVC project. Fixed linker error in nbody.
Browse files Browse the repository at this point in the history
  • Loading branch information
harrism committed Oct 26, 2012
1 parent d54c30c commit da61c59
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examples/nbody_vec4/nbody.h
@@ -1,8 +1,5 @@
#include "hemi/hemi.h"

// Softening constant prevents division by zero
HEMI_DEFINE_CONSTANT(float softeningSquared, 0.01f);

// Compute gravitational force between two bodies.
// Body mass is stored in w component of the Vec4f.
HEMI_DEV_CALLABLE
Expand Down
3 changes: 3 additions & 0 deletions examples/nbody_vec4/nbody_vec4.cu
Expand Up @@ -2,6 +2,9 @@
#include "nbody.h"
#include <stdio.h>

// Softening constant prevents division by zero
HEMI_DEFINE_CONSTANT(float softeningSquared, 0.01f);

// Compute gravitational force between two bodies.
// Body mass is stored in w component of the Vec4f.
HEMI_DEV_CALLABLE
Expand Down
2 changes: 2 additions & 0 deletions examples/nbody_vec4/nbody_vec4.vcxproj
Expand Up @@ -97,11 +97,13 @@
<PtxAsOptionV Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PtxAsOptionV>
<FastMath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</FastMath>
<GPUDebugInfo Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GPUDebugInfo>
<GenerateRelocatableDeviceCode Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateRelocatableDeviceCode>
</CudaCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\hemi\array.h" />
<ClInclude Include="..\..\hemi\hemi.h" />
<ClInclude Include="nbody.h" />
<ClInclude Include="vec4f.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down

0 comments on commit da61c59

Please sign in to comment.