Additional clauses for OpenMP parallelization.

omp-threadsafe
Salvatore Filippone 2 years ago
parent 4d988ea3db
commit adbc75b22e

@ -1208,7 +1208,7 @@ contains
if (beta == cone) then if (beta == cone) then
return return
else else
!$omp parallel do private(i) shared(beta) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) z%v(i) = beta*z%v(i)
end do end do
@ -1226,7 +1226,7 @@ contains
z%v(i) = z%v(i) + y(i)*x(i) z%v(i) = z%v(i) + y(i)*x(i)
end do end do
else else
!$omp parallel do private(i) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) + y(i)*x(i) z%v(i) = beta*z%v(i) + y(i)*x(i)
end do end do
@ -1243,24 +1243,24 @@ contains
z%v(i) = z%v(i) - y(i)*x(i) z%v(i) = z%v(i) - y(i)*x(i)
end do end do
else else
!$omp parallel do private(i) shared(beta) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) - y(i)*x(i) z%v(i) = beta*z%v(i) - y(i)*x(i)
end do end do
end if end if
else else
if (beta == czero) then if (beta == czero) then
!$omp parallel do private(i) shared(alpha) !$omp parallel do private(i) shared(alpha)
do i=1, n do i=1, n
z%v(i) = alpha*y(i)*x(i) z%v(i) = alpha*y(i)*x(i)
end do end do
else if (beta == cone) then else if (beta == cone) then
!$omp parallel do private(i) shared(alpha) !$omp parallel do private(i)
do i=1, n do i=1, n
z%v(i) = z%v(i) + alpha*y(i)*x(i) z%v(i) = z%v(i) + alpha*y(i)*x(i) shared(alpha)
end do end do
else else
!$omp parallel do private(i) shared(alpha, beta) !$omp parallel do private(i) shared(alpha, beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) + alpha*y(i)*x(i) z%v(i) = beta*z%v(i) + alpha*y(i)*x(i)
end do end do

@ -1215,7 +1215,7 @@ contains
if (beta == done) then if (beta == done) then
return return
else else
!$omp parallel do private(i) shared(beta) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) z%v(i) = beta*z%v(i)
end do end do
@ -1233,7 +1233,7 @@ contains
z%v(i) = z%v(i) + y(i)*x(i) z%v(i) = z%v(i) + y(i)*x(i)
end do end do
else else
!$omp parallel do private(i) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) + y(i)*x(i) z%v(i) = beta*z%v(i) + y(i)*x(i)
end do end do
@ -1250,24 +1250,24 @@ contains
z%v(i) = z%v(i) - y(i)*x(i) z%v(i) = z%v(i) - y(i)*x(i)
end do end do
else else
!$omp parallel do private(i) shared(beta) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) - y(i)*x(i) z%v(i) = beta*z%v(i) - y(i)*x(i)
end do end do
end if end if
else else
if (beta == dzero) then if (beta == dzero) then
!$omp parallel do private(i) shared(alpha) !$omp parallel do private(i) shared(alpha)
do i=1, n do i=1, n
z%v(i) = alpha*y(i)*x(i) z%v(i) = alpha*y(i)*x(i)
end do end do
else if (beta == done) then else if (beta == done) then
!$omp parallel do private(i) shared(alpha) !$omp parallel do private(i)
do i=1, n do i=1, n
z%v(i) = z%v(i) + alpha*y(i)*x(i) z%v(i) = z%v(i) + alpha*y(i)*x(i) shared(alpha)
end do end do
else else
!$omp parallel do private(i) shared(alpha, beta) !$omp parallel do private(i) shared(alpha, beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) + alpha*y(i)*x(i) z%v(i) = beta*z%v(i) + alpha*y(i)*x(i)
end do end do

@ -1215,7 +1215,7 @@ contains
if (beta == sone) then if (beta == sone) then
return return
else else
!$omp parallel do private(i) shared(beta) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) z%v(i) = beta*z%v(i)
end do end do
@ -1233,7 +1233,7 @@ contains
z%v(i) = z%v(i) + y(i)*x(i) z%v(i) = z%v(i) + y(i)*x(i)
end do end do
else else
!$omp parallel do private(i) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) + y(i)*x(i) z%v(i) = beta*z%v(i) + y(i)*x(i)
end do end do
@ -1250,24 +1250,24 @@ contains
z%v(i) = z%v(i) - y(i)*x(i) z%v(i) = z%v(i) - y(i)*x(i)
end do end do
else else
!$omp parallel do private(i) shared(beta) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) - y(i)*x(i) z%v(i) = beta*z%v(i) - y(i)*x(i)
end do end do
end if end if
else else
if (beta == szero) then if (beta == szero) then
!$omp parallel do private(i) shared(alpha) !$omp parallel do private(i) shared(alpha)
do i=1, n do i=1, n
z%v(i) = alpha*y(i)*x(i) z%v(i) = alpha*y(i)*x(i)
end do end do
else if (beta == sone) then else if (beta == sone) then
!$omp parallel do private(i) shared(alpha) !$omp parallel do private(i)
do i=1, n do i=1, n
z%v(i) = z%v(i) + alpha*y(i)*x(i) z%v(i) = z%v(i) + alpha*y(i)*x(i) shared(alpha)
end do end do
else else
!$omp parallel do private(i) shared(alpha, beta) !$omp parallel do private(i) shared(alpha, beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) + alpha*y(i)*x(i) z%v(i) = beta*z%v(i) + alpha*y(i)*x(i)
end do end do

@ -1208,7 +1208,7 @@ contains
if (beta == zone) then if (beta == zone) then
return return
else else
!$omp parallel do private(i) shared(beta) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) z%v(i) = beta*z%v(i)
end do end do
@ -1226,7 +1226,7 @@ contains
z%v(i) = z%v(i) + y(i)*x(i) z%v(i) = z%v(i) + y(i)*x(i)
end do end do
else else
!$omp parallel do private(i) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) + y(i)*x(i) z%v(i) = beta*z%v(i) + y(i)*x(i)
end do end do
@ -1243,24 +1243,24 @@ contains
z%v(i) = z%v(i) - y(i)*x(i) z%v(i) = z%v(i) - y(i)*x(i)
end do end do
else else
!$omp parallel do private(i) shared(beta) !$omp parallel do private(i) shared(beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) - y(i)*x(i) z%v(i) = beta*z%v(i) - y(i)*x(i)
end do end do
end if end if
else else
if (beta == zzero) then if (beta == zzero) then
!$omp parallel do private(i) shared(alpha) !$omp parallel do private(i) shared(alpha)
do i=1, n do i=1, n
z%v(i) = alpha*y(i)*x(i) z%v(i) = alpha*y(i)*x(i)
end do end do
else if (beta == zone) then else if (beta == zone) then
!$omp parallel do private(i) shared(alpha) !$omp parallel do private(i)
do i=1, n do i=1, n
z%v(i) = z%v(i) + alpha*y(i)*x(i) z%v(i) = z%v(i) + alpha*y(i)*x(i) shared(alpha)
end do end do
else else
!$omp parallel do private(i) shared(alpha, beta) !$omp parallel do private(i) shared(alpha, beta)
do i=1, n do i=1, n
z%v(i) = beta*z%v(i) + alpha*y(i)*x(i) z%v(i) = beta*z%v(i) + alpha*y(i)*x(i)
end do end do

Loading…
Cancel
Save