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
235169e3
Commit
235169e3
authored
Jul 19, 2017
by
Pavel Kus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unify nrm2 and dotc
parent
d3bdd635
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
29 deletions
+17
-29
src/general/precision_macros.h
src/general/precision_macros.h
+13
-0
test/shared/test_check_correctness_template.X90
test/shared/test_check_correctness_template.X90
+4
-29
No files found.
src/general/precision_macros.h
View file @
235169e3
...
...
@@ -31,11 +31,13 @@
#undef PRECISION_LAPY2
#undef PRECISION_LAED4
#undef PRECISION_LAED5
#undef PRECISION_NRM2
#undef cublas_PRECISION_GEMM
#undef cublas_PRECISION_TRMM
#undef cublas_PRECISION_GEMV
#undef cublas_PRECISION_SYMV
#undef scal_PRECISION_GEMM
#undef scal_PRECISION_NRM2
#undef PRECISION_SUFFIX
#undef CONST_0_0
...
...
@@ -84,11 +86,13 @@
#define PRECISION_LAPY2 DLAPY2
#define PRECISION_LAED4 DLAED4
#define PRECISION_LAED5 DLAED5
#define PRECISION_NRM2 DNRM2
#define cublas_PRECISION_GEMM cublas_DGEMM
#define cublas_PRECISION_TRMM cublas_DTRMM
#define cublas_PRECISION_GEMV cublas_DGEMV
#define cublas_PRECISION_SYMV cublas_DSYMV
#define scal_PRECISION_GEMM PDGEMM
#define scal_PRECISION_NRM2 PDNRM2
#define CONST_0_0 0.0_rk8
#define CONST_0_5 0.5_rk8
#define CONST_1_0 1.0_rk8
...
...
@@ -134,11 +138,13 @@
#define PRECISION_LAPY2 SLAPY2
#define PRECISION_LAED4 SLAED4
#define PRECISION_LAED5 SLAED5
#define PRECISION_NRM2 SNRM2
#define cublas_PRECISION_GEMM cublas_SGEMM
#define cublas_PRECISION_TRMM cublas_STRMM
#define cublas_PRECISION_GEMV cublas_SGEMV
#define cublas_PRECISION_SYMV cublas_SSYMV
#define scal_PRECISION_GEMM PSGEMM
#define scal_PRECISION_NRM2 PSNRM2
#define CONST_0_0 0.0_rk4
#define CONST_0_5 0.5_rk4
#define CONST_1_0 1.0_rk4
...
...
@@ -188,11 +194,13 @@
#undef PRECISION_LAPY2
#undef PRECISION_LAED4
#undef PRECISION_LAED5
#undef PRECISION_DOTC
#undef cublas_PRECISION_GEMM
#undef cublas_PRECISION_TRMM
#undef cublas_PRECISION_GEMV
#undef cublas_PRECISION_SYMV
#undef scal_PRECISION_GEMM
#undef scal_PRECISION_DOTC
#undef PRECISION_SUFFIX
#undef MPI_COMPLEX_PRECISION
#undef MPI_MATH_DATATYPE_PRECISION
...
...
@@ -213,6 +221,7 @@
#undef CONST_COMPLEX_1_0
#undef C_DATATYPE_KIND
#undef THRESHOLD
/* General definitions needed in single and double case */
...
...
@@ -251,11 +260,13 @@
#define PRECISION_LAPY2 ZLAPY2
#define PRECISION_LAED4 ZLAED4
#define PRECISION_LAED5 ZLAED5
#define PRECISION_DOTC ZDOTC
#define cublas_PRECISION_GEMM cublas_ZGEMM
#define cublas_PRECISION_TRMM cublas_ZTRMM
#define cublas_PRECISION_GEMV cublas_ZGEMV
#define cublas_PRECISION_SYMV cublas_ZSYMV
#define scal_PRECISION_GEMM PZGEMM
#define scal_PRECISION_DOTC PZDOTC
#define MPI_COMPLEX_PRECISION MPI_DOUBLE_COMPLEX
#define MPI_MATH_DATATYPE_PRECISION MPI_DOUBLE_COMPLEX
#define MPI_COMPLEX_EXPLICIT_PRECISION MPI_COMPLEX16
...
...
@@ -309,11 +320,13 @@
#define PRECISION_LAPY2 CLAPY2
#define PRECISION_LAED4 CLAED4
#define PRECISION_LAED5 CLAED5
#define PRECISION_DOTC CDOTC
#define cublas_PRECISION_GEMM cublas_CGEMM
#define cublas_PRECISION_TRMM cublas_CTRMM
#define cublas_PRECISION_GEMV cublas_CGEMV
#define cublas_PRECISION_SYMV cublas_CSYMV
#define scal_PRECISION_GEMM PCGEMM
#define scal_PRECISION_DOTC PCDOTC
#define MPI_COMPLEX_PRECISION MPI_COMPLEX
#define MPI_MATH_DATATYPE_PRECISION MPI_COMPLEX
#define MPI_COMPLEX_EXPLICIT_PRECISION MPI_COMPLEX8
...
...
test/shared/test_check_correctness_template.X90
View file @
235169e3
...
...
@@ -187,22 +187,9 @@
#endif
#ifdef WITH_MPI
#ifdef DOUBLE_PRECISION_REAL
call
pdnrm2
(
na
,
err
,
tmp1
,
1
,
i
,
sc_desc
,
1
)
#else
call
psnrm2
(
na
,
err
,
tmp1
,
1
,
i
,
sc_desc
,
1
)
#endif
call
scal_PRECISION_NRM2
(
na
,
err
,
tmp1
,
1
,
i
,
sc_desc
,
1
)
#else /* WITH_MPI */
#ifdef DOUBLE_PRECISION_REAL
! call dnrm2(na,err,tmp1,1,i,sc_desc,1)
err
=
dnrm2
(
na
,
tmp1
(
1
,
i
),
1
)
#else
err
=
snrm2
(
na
,
tmp1
(
1
,
i
),
1
)
#endif
err
=
PRECISION_NRM2
(
na
,
tmp1
(
1
,
i
),
1
)
#endif /* WITH_MPI */
errmax
=
max
(
errmax
,
err
)
#endif /* REALCASE */
...
...
@@ -210,21 +197,9 @@
#if COMPLEXCASE == 1
xc
=
0
#ifdef WITH_MPI
#ifdef DOUBLE_PRECISION_COMPLEX
call
pzdotc
(
na
,
xc
,
tmp1
,
1
,
i
,
sc_desc
,
1
,
tmp1
,
1
,
i
,
sc_desc
,
1
)
#else
call
pcdotc
(
na
,
xc
,
tmp1
,
1
,
i
,
sc_desc
,
1
,
tmp1
,
1
,
i
,
sc_desc
,
1
)
#endif
call
scal_PRECISION_DOTC
(
na
,
xc
,
tmp1
,
1
,
i
,
sc_desc
,
1
,
tmp1
,
1
,
i
,
sc_desc
,
1
)
#else /* WITH_MPI */
#ifdef DOUBLE_PRECISION_COMPLEX
xc
=
zdotc
(
na
,
tmp1
,
1
,
tmp1
,
1
)
#else
xc
=
cdotc
(
na
,
tmp1
,
1
,
tmp1
,
1
)
#endif
xc
=
PRECISION_DOTC
(
na
,
tmp1
,
1
,
tmp1
,
1
)
#endif /* WITH_MPI */
...
...
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