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
elpa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
elpa
elpa
Commits
83c2b3fe
Commit
83c2b3fe
authored
Jul 19, 2017
by
Pavel Kus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shorter way to say variable is zero
parent
235169e3
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
27 deletions
+6
-27
src/general/precision_macros.h
src/general/precision_macros.h
+3
-0
test/shared/test_check_correctness_template.X90
test/shared/test_check_correctness_template.X90
+3
-27
No files found.
src/general/precision_macros.h
View file @
83c2b3fe
...
...
@@ -41,6 +41,7 @@
#undef PRECISION_SUFFIX
#undef CONST_0_0
#undef CONST_REAL_0_0
#undef CONST_0_5
#undef CONST_1_0
#undef CONST_2_0
...
...
@@ -94,6 +95,7 @@
#define scal_PRECISION_GEMM PDGEMM
#define scal_PRECISION_NRM2 PDNRM2
#define CONST_0_0 0.0_rk8
#define CONST_REAL_0_0 0.0_rk8
#define CONST_0_5 0.5_rk8
#define CONST_1_0 1.0_rk8
#define CONST_2_0 2.0_rk8
...
...
@@ -146,6 +148,7 @@
#define scal_PRECISION_GEMM PSGEMM
#define scal_PRECISION_NRM2 PSNRM2
#define CONST_0_0 0.0_rk4
#define CONST_REAL_0_0 0.0_rk4
#define CONST_0_5 0.5_rk4
#define CONST_1_0 1.0_rk4
#define CONST_2_0 2.0_rk4
...
...
test/shared/test_check_correctness_template.X90
View file @
83c2b3fe
...
...
@@ -163,29 +163,11 @@
tmp1
(:,:)
=
tmp1
(:,:)
-
tmp2
(:,:)
! Get maximum norm of columns of tmp1
#if REALCASE == 1
#ifdef DOUBLE_PRECISION_REAL
errmax
=
0.0_rk8
#else
errmax
=
0.0_rk4
#endif
#endif
#if COMPLEXCASE == 1
#ifdef DOUBLE_PRECISION_COMPLEX
errmax
=
0.0_rk8
#else
errmax
=
0.0_rk4
#endif
#endif
errmax
=
CONST_REAL_0_0
do
i
=
1
,
nev
#if REALCASE == 1
#ifdef DOUBLE_PRECISION_REAL
err
=
0.0_rk8
#else
err
=
0.0_rk4
#endif
err
=
CONST_0_0
#ifdef WITH_MPI
call
scal_PRECISION_NRM2
(
na
,
err
,
tmp1
,
1
,
i
,
sc_desc
,
1
)
#else /* WITH_MPI */
...
...
@@ -201,13 +183,7 @@
#else /* WITH_MPI */
xc
=
PRECISION_DOTC
(
na
,
tmp1
,
1
,
tmp1
,
1
)
#endif /* WITH_MPI */
#ifdef DOUBLE_PRECISION_COMPLEX
errmax
=
max
(
errmax
,
sqrt
(
real
(
xc
,
kind
=
rk8
)))
#else
errmax
=
max
(
errmax
,
sqrt
(
real
(
xc
,
kind
=
rk4
)))
#endif
errmax
=
max
(
errmax
,
sqrt
(
real
(
xc
,
kind
=
REAL_DATATYPE
)))
#endif /* COMPLEXCASE */
enddo
...
...
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