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

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

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

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

Loading…
Cancel
Save