Commit 83c2b3fe authored by Pavel Kus's avatar Pavel Kus
Browse files

shorter way to say variable is zero

parent 235169e3
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment