96 real(RP),
dimension(:),
intent(inout) :: x
97 real(RP) ,
intent(in) :: a
98 real(RP),
dimension(:),
intent(in) :: y
103 if (
size(y,1) <
size(x,1))
call quit(&
104 &
"R1d_mod: R1d_axpy: 1" )
111 x(ii) = a*x(ii) + y(ii)
120 subroutine xpay_1(x, a, y)
121 real(RP),
dimension(:),
intent(inout) :: x
122 real(RP) ,
intent(in) :: a
123 real(RP),
dimension(:),
intent(in) :: y
128 if (
size(y,1) <
size(x,1))
call quit(&
129 &
"R1d_mod: xpay_1: 1" )
133 if (
equal(a,1._rp))
then 137 x(ii) = x(ii) + y(ii)
145 x(ii) = x(ii) + a*y(ii)
156 subroutine xpay_2(z, x, a, y)
157 real(RP),
dimension(:),
intent(out) :: z
158 real(RP) ,
intent(in) :: a
159 real(RP),
dimension(:),
intent(in) :: x, y
164 if (
size(x,1) <
size(z,1))
call quit(&
165 &
"R1d_mod: xpay_2: 1" )
166 if (
size(y,1) <
size(z,1))
call quit(&
167 &
"R1d_mod: xpay_2: 2" )
171 if (
equal(a,1._rp))
then 175 z(ii) = x(ii) + y(ii)
184 z(ii) = x(ii) + a*y(ii)
197 real(RP),
dimension(:),
intent(inout) :: x
198 real(RP) ,
intent(in) :: a, b
199 real(RP),
dimension(:),
intent(in) :: y
204 if (
size(y,1) <
size(x,1))
call quit(&
205 &
"R1d_mod: axpby_1: 1" )
212 x(ii) = a*x(ii) + b*y(ii)
221 subroutine axpby_2(z, a, x, b, y)
222 real(RP),
dimension(:),
intent(out) :: z
223 real(RP) ,
intent(in) :: a, b
224 real(RP),
dimension(:),
intent(in) :: x, y
229 if (
size(x,1) <
size(z,1))
call quit(&
230 &
"R1d_mod: axpby_2: 1" )
231 if (
size(y,1) <
size(z,1))
call quit(&
232 &
"R1d_mod: axpby_2: 2" )
239 z(ii) = a*x(ii) + b*y(ii)
248 subroutine ax_1(x, a)
249 real(RP),
dimension(:),
intent(inout) :: x
250 real(RP) ,
intent(in) :: a
268 subroutine ax_2(y, a, x)
269 real(RP),
dimension(:),
intent(out) :: y
270 real(RP) ,
intent(in) :: a
271 real(RP),
dimension(:),
intent(in) :: x
276 if (
size(x,1) <
size(y,1))
call quit(&
277 &
"R1d_mod: ax_2: 1" )
295 real(RP),
dimension(:),
intent(out) :: y
296 real(RP),
dimension(:),
intent(in) :: x
301 if (
size(x,1) <
size(y,1))
call quit(&
302 &
"R1d_mod: R1d_copy: 1" )
319 real(RP),
dimension(:),
intent(in) :: x, y
324 if (
size(x,1) /=
size(y,1))
call quit(&
325 &
"R1d_mod: R1d_scalProd: 1" )
333 res = res + x(ii) * y(ii)
343 real(RP),
dimension(:),
intent(in) :: x
355 real(RP),
dimension(:),
intent(out) :: y
356 real(RP),
dimension(:),
intent(in) :: x
357 integer ,
dimension(:),
intent(in) :: sigma
362 if (
size(x,1) /=
size(y,1))
call quit(&
363 &
"R1d_mod: : R1d_reorder: 1" )
364 if (
size(x,1) /=
size(sigma,1))
call quit(&
365 &
"R1d_mod: : R1d_reorder: 2" )
383 subroutine xy_2(z, x, y)
384 real(RP),
dimension(:),
intent(out) :: z
385 real(RP),
dimension(:),
intent(in) :: x, y
390 if (
size(x,1) <
size(z,1))
call quit(&
391 &
"R1d_mod: xy_2: 1" )
392 if (
size(y,1) <
size(z,1))
call quit(&
393 &
"R1d_mod: xy_2: 2" )
400 z(ii) = x(ii) * y(ii)
subroutine xpay_2(z, x, a, y)
z(:) := x(:) + a*y(:)
subroutine r1d_axpy(a, x, y)
x(:) := a*x(:) + y(:)
subroutine ax_1(x, a)
x(:) := a*x(:)
subroutine ax_2(y, a, x)
y(:) := a*x(:)
integer, parameter, public rp
real(kind=RP) = real precision in the code REAL_TOL = epsilon to test real equality ...
REAL NUMBERS PRECISION IN CHORAL: selects simple/double/quad
OPENMP OPERATIONS ON 1-DIMENSIONAL REAL ARRAYS
subroutine xpay_1(x, a, y)
x(:) := x(:) + a*y(:)
subroutine r1d_copy(y, x)
y(:) := x(:)
real(rp) function r1d_scalprod(x, y)
scalar product
x = x + b*y // OR // z = x + b*y
subroutine xy_2(z, x, y)
z(:) := x(:)*y(:)
real(rp) function r1d_norm_2(x)
Euclidian norm.
subroutine r1d_reorder(y, sigma, x)
y(ii) := x(sigma(ii))
subroutine axpby_1(a, x, b, y)
x(:) := a*x(:) + b*y(:)
subroutine axpby_2(z, a, x, b, y)
z(:) := a*x(:) + b*y(:)