Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
20d3b573
Commit
20d3b573
authored
Jun 05, 2013
by
BRAMAS Berenger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sse support in cmake and in defines
parent
2b0978af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
CMakeLists.txt
CMakeLists.txt
+13
-1
Src/ScalFmmConfig.h.cmake
Src/ScalFmmConfig.h.cmake
+6
-0
No files found.
CMakeLists.txt
View file @
20d3b573
...
...
@@ -44,6 +44,7 @@ OPTION( SCALFMM_USE_MEM_STATS "Set to ON to profile memory" OFF )
OPTION
(
SCALFMM_USE_DOUBLE_PRECISION
"Set to ON to compile in double precision"
ON
)
OPTION
(
SCALFMM_ATTACHE_SOURCE
"Set to ON to compile with -g"
OFF
)
OPTION
(
SCALFMM_USE_ADDONS
"Set to ON to compile add ons"
OFF
)
OPTION
(
SCALFMM_USE_SSE
"Set to ON to compile with sse support"
ON
)
#
SET
(
SCALFMM_LIBRARIES
""
)
...
...
@@ -72,8 +73,9 @@ else()
endif
()
# Attach source code to exec
MESSAGE
(
STATUS
"SCALFMM_ATTACHE_SOURCE =
${
SCALFMM_ATTACHE_SOURCE
}
"
)
if
(
SCALFMM_ATTACHE_SOURCE
)
MESSAGE
(
STATUS
"
Use -g in compiler flags
"
)
MESSAGE
(
STATUS
"
Option -g is used, the code is attached to the binary.
"
)
ADD_DEFINITIONS
(
-g
)
endif
()
...
...
@@ -108,6 +110,16 @@ ADD_DEFINITIONS(-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wconversion -fpic -s
CONFIGURE_FILE
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/Src/ScalFmmConfig.h.cmake
${
CMAKE_BINARY_DIR
}
/Src/ScalFmmConfig.h
)
# Compile optimization
SET
(
SCALFMM_FLAGS_OPTI
"-m64 -Ofast -flto -march=native -funroll-loops -ftree-vectorize"
CACHE STRING
"Set your optimization flags."
)
ADD_DEFINITIONS
(
${
SCALFMM_FLAGS_OPTI
}
)
# Use SSE
MESSAGE
(
STATUS
"SCALFMM_USE_SSE =
${
SCALFMM_USE_SSE
}
"
)
if
(
SCALFMM_USE_SSE
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-msse -msse2 -msse3 -mfpmath=sse"
)
endif
()
# Use Mem stats
MESSAGE
(
STATUS
"SCALFMM_USE_MEM_STATS =
${
SCALFMM_USE_MEM_STATS
}
"
)
...
...
Src/ScalFmmConfig.h.cmake
View file @
20d3b573
...
...
@@ -56,4 +56,10 @@
#cmakedefine SCALFMM_USE_STARPU
///////////////////////////////////////////////////////
// SSE
///////////////////////////////////////////////////////
#cmakedefine SCALFMM_USE_SSE
#endif // CONFIG_H
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