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
a991bebc
Commit
a991bebc
authored
Mar 01, 2018
by
COULAUD Olivier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CMAKE_CXX_STANDARD, fix some issues detected by sonarQube
parent
26e3813d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
415 additions
and
359 deletions
+415
-359
CMakeLists.txt
CMakeLists.txt
+6
-3
Src/Kernels/Chebyshev/FChebM2LHandler.hpp
Src/Kernels/Chebyshev/FChebM2LHandler.hpp
+377
-347
Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp
Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp
+32
-9
No files found.
CMakeLists.txt
View file @
a991bebc
...
...
@@ -13,7 +13,6 @@ set(FUSE_LIST " MPI;BLAS;FFT;STARPU;CUDA;OPENCL;OMP4;SSE;AVX;AVX2;MIC;MPI2")
# Project Declaration
#===========================================================================
project
(
SCALFMM C CXX
)
# check if compiling into source directories
string
(
COMPARE EQUAL
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
insource
)
if
(
insource
)
...
...
@@ -28,7 +27,7 @@ INCLUDE(CMakeDependentOption)
# Add to check CPU info
include
(
GetCpuInfos
)
GetCpuInfos
()
#
#===========================================================================
# Version Number
#===========================================================================
...
...
@@ -39,6 +38,10 @@ set(SCALFMM_MINOR_VERSION 0)
set
(
SCALFMM_PATCH_VERSION rc0
)
set
(
SCALFMM_VERSION
"
${
SCALFMM_MAJOR_VERSION
}
.
${
SCALFMM_MINOR_VERSION
}
.
${
SCALFMM_PATCH_VERSION
}
"
)
SET
(
CXX_STANDARD_REQUIRED ON
)
SET
(
CMAKE_CXX_STANDARD 14
)
set
(
MORSE_DISTRIB_DIR
""
CACHE PATH
"Directory of MORSE distribution"
)
if
(
MORSE_DISTRIB_DIR OR EXISTS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/CMakeModules/morse/"
)
...
...
@@ -140,7 +143,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
message
(
STATUS
"CXX
${
CMAKE_CXX_COMPILER_ID
}
"
)
# Set scalfmm to default libraries
set
(
SCALFMM_LIBRARIES
""
)
set
(
SCALFMM_CXX_FLAGS
"-
std=c++14 -
fpic -Wall"
)
set
(
SCALFMM_CXX_FLAGS
"-fpic -Wall"
)
set
(
SCALFMM_CXX_FLAGS
"
${
SCALFMM_CXX_FLAGS
}
-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/Contribs"
)
#
#
...
...
Src/Kernels/Chebyshev/FChebM2LHandler.hpp
View file @
a991bebc
This diff is collapsed.
Click to expand it.
Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp
View file @
a991bebc
...
...
@@ -9,8 +9,8 @@
#include "FChebTensor.hpp"
#include "
..
/Interpolation/FInterpSymmetries.hpp"
#include "
Kernels
/Interpolation/FInterpSymmetries.hpp"
#include "Kernels/Interpolation/FInterpMatrixKernel.hpp"
#include "FChebM2LHandler.hpp"
#include "Utils/FAca.hpp"
...
...
@@ -156,6 +156,10 @@ static void precompute(const MatrixKernelClass *const MatrixKernel, const FReal
if
(
INFO
!=
0
){
std
::
stringstream
stream
;
stream
<<
INFO
;
delete
[]
U
;
delete
[]
WORK
;
delete
[]
VT
;
delete
[]
S
;
throw
std
::
runtime_error
(
"SVD did not converge with "
+
stream
.
str
());
}
rank
=
FSvd
::
getRank
(
S
,
aca_rank
,
Epsilon
);
...
...
@@ -348,7 +352,12 @@ public:
/** Destructor */
~
SymmetryHandler
()
{
for
(
unsigned
int
t
=
0
;
t
<
343
;
++
t
)
if
(
K
[
t
]
!=
nullptr
)
delete
[]
K
[
t
];
for
(
unsigned
int
t
=
0
;
t
<
343
;
++
t
){
if
(
K
[
t
]
!=
nullptr
){
delete
[]
K
[
t
];
}
}
}
...
...
@@ -396,8 +405,10 @@ public:
// init all 343 item to zero, because effectively only 16 exist
K
=
new
FReal
**
[
TreeHeight
];
LowRank
=
new
int
*
[
TreeHeight
];
K
[
0
]
=
nullptr
;
K
[
1
]
=
nullptr
;
LowRank
[
0
]
=
nullptr
;
LowRank
[
1
]
=
nullptr
;
K
[
0
]
=
nullptr
;
K
[
1
]
=
nullptr
;
LowRank
[
0
]
=
nullptr
;
LowRank
[
1
]
=
nullptr
;
for
(
unsigned
int
l
=
2
;
l
<
TreeHeight
;
++
l
)
{
K
[
l
]
=
new
FReal
*
[
343
];
LowRank
[
l
]
=
new
int
[
343
];
...
...
@@ -435,10 +446,17 @@ public:
{
for
(
unsigned
int
l
=
0
;
l
<
TreeHeight
;
++
l
)
{
if
(
K
[
l
]
!=
nullptr
)
{
for
(
unsigned
int
t
=
0
;
t
<
343
;
++
t
)
if
(
K
[
l
][
t
]
!=
nullptr
)
delete
[]
K
[
l
][
t
];
for
(
unsigned
int
t
=
0
;
t
<
343
;
++
t
)
{
if
(
K
[
l
][
t
]
!=
nullptr
){
delete
[]
K
[
l
][
t
];
}
}
delete
[]
K
[
l
];
}
if
(
LowRank
[
l
]
!=
nullptr
)
delete
[]
LowRank
[
l
];
if
(
LowRank
[
l
]
!=
nullptr
)
{
delete
[]
LowRank
[
l
];
}
}
delete
[]
K
;
delete
[]
LowRank
;
...
...
@@ -476,7 +494,8 @@ static void ComputeAndCompressAndStoreInBinaryFile(const MatrixKernelClass *cons
// compute and compress ////////////
FReal
*
K
[
343
];
int
LowRank
[
343
];
for
(
unsigned
int
idx
=
0
;
idx
<
343
;
++
idx
)
{
K
[
idx
]
=
nullptr
;
LowRank
[
idx
]
=
0
;
}
for
(
unsigned
int
idx
=
0
;
idx
<
343
;
++
idx
)
{
K
[
idx
]
=
nullptr
;
LowRank
[
idx
]
=
0
;
}
precompute
<
FReal
,
ORDER
>
(
MatrixKernel
,
FReal
(
2.
),
Epsilon
,
K
,
LowRank
);
// write to binary file ////////////
...
...
@@ -510,7 +529,11 @@ static void ComputeAndCompressAndStoreInBinaryFile(const MatrixKernelClass *cons
// << " in " << time.tacAndElapsed() << "sec." << std::endl;
// free memory /////////////////////
for
(
unsigned
int
t
=
0
;
t
<
343
;
++
t
)
if
(
K
[
t
]
!=
nullptr
)
delete
[]
K
[
t
];
for
(
unsigned
int
t
=
0
;
t
<
343
;
++
t
)
{
if
(
K
[
t
]
!=
nullptr
)
{
delete
[]
K
[
t
];
}
}
}
...
...
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