Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
8a5d3e10
Commit
8a5d3e10
authored
Jul 26, 2012
by
breuera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added compile options for a compute capability < 2.0.
parent
652d8bf3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
SConstruct
SConstruct
+2
-1
SWE_WavePropagationBlockCuda_kernels.cu
src/SWE_WavePropagationBlockCuda_kernels.cu
+8
-0
No files found.
SConstruct
View file @
8a5d3e10
...
...
@@ -73,7 +73,8 @@ vars.AddVariables(
),
EnumVariable
(
'computeCapability'
,
'optional architecture/compute capability of the CUDA card'
,
'sm_20'
,
allowed_values
=
(
'sm_20'
,
'sm_21'
,
'sm_22'
,
'sm_23'
)
allowed_values
=
(
'sm_10'
,
'sm_11'
,
'sm_12'
,
'sm_13'
,
'sm_20'
,
'sm_21'
,
'sm_22'
,
'sm_23'
)
),
BoolVariable
(
'openGL'
,
'compile with OpenGL visualization'
,
False
),
...
...
src/SWE_WavePropagationBlockCuda_kernels.cu
View file @
8a5d3e10
...
...
@@ -192,9 +192,13 @@ void computeNetUpdatesKernel(
reductionPartner = computeOneDPositionKernel(threadIdx.x, threadIdx.y+reductionBlockDimY, blockDim.y);
}
#ifndef NDEBUG
#if defined(__CUDA_ARCH__) & (__CUDA_ARCH__ < 200)
#warning skipping printf command, which was introduced for compute capability >= 2.0
#else
else {
printf("computeNetUpdatesKernel(...): There was an error in the reducing procedure!\n");
}
#endif
#endif
if(threadIdx.x < reductionBlockDimX && threadIdx.y < reductionBlockDimY) { // use only half the threads in each reduction
//execute the reduction routine (maximum)
...
...
@@ -307,8 +311,12 @@ void updateUnknownsKernel(
l_cellPosition = computeOneDPositionKernel(l_cellIndexI, l_cellIndexJ, i_nY+2);
#ifndef NDEBUG
#if defined(__CUDA_ARCH__) & (__CUDA_ARCH__ < 200)
#warning skipping printf command, which was introduced for compute capability >= 2.0
#else
if(l_cellPosition > (i_nX+2)*(i_nY+2))
printf("Warning: cellPosition(%i) > (i_nx+2)*(i_ny+2)\n", l_cellPosition);
#endif
#endif
//! positions of the net-updates in the global CUDA-arrays.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment