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
d54b0182
Commit
d54b0182
authored
Nov 16, 2012
by
Sebastian Rettenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow changing physical_vector_size via scons
parent
2715e5a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
SConstruct
SConstruct
+15
-1
SWE_WavePropagationBlock.cpp
src/SWE_WavePropagationBlock.cpp
+0
-5
No files found.
SConstruct
View file @
d54b0182
...
...
@@ -46,6 +46,18 @@ print ''
import
os
def
isInt
(
key
,
value
,
env
):
"""Makes sure value is an integer"""
try
:
int
(
value
)
except
ValueError
:
return
False
return
True
def
toInt
(
value
):
return
int
(
value
)
#
# set possible variables
#
...
...
@@ -101,6 +113,8 @@ vars.AddVariables(
EnumVariable
(
'platform'
,
'compile for a specific platform (Intel compiler only'
,
'default'
,
allowed_values
=
(
'default'
,
'mic'
)
),
(
'physicalVectorSize'
,
'size of vector registers is bits'
,
128
,
isInt
,
toInt
),
BoolVariable
(
'xmlRuntime'
,
'use a xml-file for runtime parameters'
,
False
)
)
...
...
@@ -210,7 +224,7 @@ elif env['solver'] == 'augrie':
elif
env
[
'solver'
]
==
'hybrid'
:
env
.
Append
(
CPPDEFINES
=
[
'WAVE_PROPAGATION_SOLVER=0'
])
elif
env
[
'solver'
]
==
'fwavevec'
:
env
.
Append
(
CPPDEFINES
=
[
'WAVE_PROPAGATION_SOLVER=4'
])
env
.
Append
(
CPPDEFINES
=
[
'WAVE_PROPAGATION_SOLVER=4'
,
'PHYSICAL_VECTOR_SIZE='
+
str
(
env
[
'physicalVectorSize'
])
])
# set the precompiler flags for serial version
if
env
[
'parallelization'
]
in
[
'none'
,
'cuda'
]:
...
...
src/SWE_WavePropagationBlock.cpp
View file @
d54b0182
...
...
@@ -34,11 +34,6 @@
#include <omp.h>
#endif
#ifndef PHYSICAL_VECTOR_SIZE
#define PHYSICAL_VECTOR_SIZE 128
#endif
#include <cstdlib>
#if WAVE_PROPAGATION_SOLVER==4
/** The number of floats that fit in one vector register */
#define VECTOR_LENGTH (PHYSICAL_VECTOR_SIZE/8/sizeof(float))
...
...
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