Put in OpenMP in CSR, first step.

new-context
Salvatore Filippone 4 years ago
parent 23f69f58d4
commit 77730de80c

@ -130,10 +130,12 @@ contains
if (alpha == czero) then if (alpha == czero) then
if (beta == czero) then if (beta == czero) then
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i) = czero y(i) = czero
enddo enddo
else else
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i) = beta*y(i) y(i) = beta*y(i)
end do end do
@ -147,6 +149,7 @@ contains
if (beta == czero) then if (beta == czero) then
if (alpha == cone) then if (alpha == cone) then
!$omp parallel do private(i,j, acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -157,6 +160,7 @@ contains
else if (alpha == -cone) then else if (alpha == -cone) then
!$omp parallel do private(i,j, acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -167,6 +171,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -181,6 +186,7 @@ contains
else if (beta == cone) then else if (beta == cone) then
if (alpha == cone) then if (alpha == cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -191,6 +197,7 @@ contains
else if (alpha == -cone) then else if (alpha == -cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -201,6 +208,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -214,6 +222,7 @@ contains
else if (beta == -cone) then else if (beta == -cone) then
if (alpha == cone) then if (alpha == cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -224,6 +233,7 @@ contains
else if (alpha == -cone) then else if (alpha == -cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -234,6 +244,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -247,6 +258,7 @@ contains
else else
if (alpha == cone) then if (alpha == cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -257,6 +269,7 @@ contains
else if (alpha == -cone) then else if (alpha == -cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -267,6 +280,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = czero acc = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -282,16 +296,19 @@ contains
else if (tra) then else if (tra) then
if (beta == czero) then if (beta == czero) then
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = czero y(i) = czero
end do end do
else if (beta == cone) then else if (beta == cone) then
! Do nothing ! Do nothing
else if (beta == -cone) then else if (beta == -cone) then
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = -y(i) y(i) = -y(i)
end do end do
else else
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = beta*y(i) y(i) = beta*y(i)
end do end do
@ -476,16 +493,18 @@ contains
complex(psb_spk_), intent(inout) :: y(ldy,*) complex(psb_spk_), intent(inout) :: y(ldy,*)
logical, intent(in) :: is_triangle,is_unit,tra,ctra logical, intent(in) :: is_triangle,is_unit,tra,ctra
complex(psb_spk_), intent(inout) :: acc(*) complex(psb_spk_), intent(inout) :: acc(:)
integer(psb_ipk_) :: i,j, ir integer(psb_ipk_) :: i,j, ir
if (alpha == czero) then if (alpha == czero) then
if (beta == czero) then if (beta == czero) then
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i,1:nc) = czero y(i,1:nc) = czero
enddo enddo
else else
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i,1:nc) = beta*y(i,1:nc) y(i,1:nc) = beta*y(i,1:nc)
end do end do
@ -497,6 +516,7 @@ contains
if (beta == czero) then if (beta == czero) then
if (alpha == cone) then if (alpha == cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -507,6 +527,7 @@ contains
else if (alpha == -cone) then else if (alpha == -cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -517,6 +538,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -531,6 +553,7 @@ contains
else if (beta == cone) then else if (beta == cone) then
if (alpha == cone) then if (alpha == cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -541,6 +564,7 @@ contains
else if (alpha == -cone) then else if (alpha == -cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -551,6 +575,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -564,6 +589,7 @@ contains
else if (beta == -cone) then else if (beta == -cone) then
if (alpha == cone) then if (alpha == cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -574,6 +600,7 @@ contains
else if (alpha == -cone) then else if (alpha == -cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -584,6 +611,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -597,6 +625,7 @@ contains
else else
if (alpha == cone) then if (alpha == cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -607,6 +636,7 @@ contains
else if (alpha == -cone) then else if (alpha == -cone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -617,6 +647,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = czero acc(1:nc) = czero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1

@ -130,10 +130,12 @@ contains
if (alpha == dzero) then if (alpha == dzero) then
if (beta == dzero) then if (beta == dzero) then
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i) = dzero y(i) = dzero
enddo enddo
else else
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i) = beta*y(i) y(i) = beta*y(i)
end do end do
@ -147,6 +149,7 @@ contains
if (beta == dzero) then if (beta == dzero) then
if (alpha == done) then if (alpha == done) then
!$omp parallel do private(i,j, acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -157,6 +160,7 @@ contains
else if (alpha == -done) then else if (alpha == -done) then
!$omp parallel do private(i,j, acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -167,6 +171,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -181,6 +186,7 @@ contains
else if (beta == done) then else if (beta == done) then
if (alpha == done) then if (alpha == done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -191,6 +197,7 @@ contains
else if (alpha == -done) then else if (alpha == -done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -201,6 +208,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -214,6 +222,7 @@ contains
else if (beta == -done) then else if (beta == -done) then
if (alpha == done) then if (alpha == done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -224,6 +233,7 @@ contains
else if (alpha == -done) then else if (alpha == -done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -234,6 +244,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -247,6 +258,7 @@ contains
else else
if (alpha == done) then if (alpha == done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -257,6 +269,7 @@ contains
else if (alpha == -done) then else if (alpha == -done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -267,6 +280,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = dzero acc = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -282,16 +296,19 @@ contains
else if (tra) then else if (tra) then
if (beta == dzero) then if (beta == dzero) then
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = dzero y(i) = dzero
end do end do
else if (beta == done) then else if (beta == done) then
! Do nothing ! Do nothing
else if (beta == -done) then else if (beta == -done) then
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = -y(i) y(i) = -y(i)
end do end do
else else
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = beta*y(i) y(i) = beta*y(i)
end do end do
@ -476,16 +493,18 @@ contains
real(psb_dpk_), intent(inout) :: y(ldy,*) real(psb_dpk_), intent(inout) :: y(ldy,*)
logical, intent(in) :: is_triangle,is_unit,tra,ctra logical, intent(in) :: is_triangle,is_unit,tra,ctra
real(psb_dpk_), intent(inout) :: acc(*) real(psb_dpk_), intent(inout) :: acc(:)
integer(psb_ipk_) :: i,j, ir integer(psb_ipk_) :: i,j, ir
if (alpha == dzero) then if (alpha == dzero) then
if (beta == dzero) then if (beta == dzero) then
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i,1:nc) = dzero y(i,1:nc) = dzero
enddo enddo
else else
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i,1:nc) = beta*y(i,1:nc) y(i,1:nc) = beta*y(i,1:nc)
end do end do
@ -497,6 +516,7 @@ contains
if (beta == dzero) then if (beta == dzero) then
if (alpha == done) then if (alpha == done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -507,6 +527,7 @@ contains
else if (alpha == -done) then else if (alpha == -done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -517,6 +538,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -531,6 +553,7 @@ contains
else if (beta == done) then else if (beta == done) then
if (alpha == done) then if (alpha == done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -541,6 +564,7 @@ contains
else if (alpha == -done) then else if (alpha == -done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -551,6 +575,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -564,6 +589,7 @@ contains
else if (beta == -done) then else if (beta == -done) then
if (alpha == done) then if (alpha == done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -574,6 +600,7 @@ contains
else if (alpha == -done) then else if (alpha == -done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -584,6 +611,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -597,6 +625,7 @@ contains
else else
if (alpha == done) then if (alpha == done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -607,6 +636,7 @@ contains
else if (alpha == -done) then else if (alpha == -done) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -617,6 +647,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = dzero acc(1:nc) = dzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1

@ -130,10 +130,12 @@ contains
if (alpha == szero) then if (alpha == szero) then
if (beta == szero) then if (beta == szero) then
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i) = szero y(i) = szero
enddo enddo
else else
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i) = beta*y(i) y(i) = beta*y(i)
end do end do
@ -147,6 +149,7 @@ contains
if (beta == szero) then if (beta == szero) then
if (alpha == sone) then if (alpha == sone) then
!$omp parallel do private(i,j, acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -157,6 +160,7 @@ contains
else if (alpha == -sone) then else if (alpha == -sone) then
!$omp parallel do private(i,j, acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -167,6 +171,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -181,6 +186,7 @@ contains
else if (beta == sone) then else if (beta == sone) then
if (alpha == sone) then if (alpha == sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -191,6 +197,7 @@ contains
else if (alpha == -sone) then else if (alpha == -sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -201,6 +208,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -214,6 +222,7 @@ contains
else if (beta == -sone) then else if (beta == -sone) then
if (alpha == sone) then if (alpha == sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -224,6 +233,7 @@ contains
else if (alpha == -sone) then else if (alpha == -sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -234,6 +244,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -247,6 +258,7 @@ contains
else else
if (alpha == sone) then if (alpha == sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -257,6 +269,7 @@ contains
else if (alpha == -sone) then else if (alpha == -sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -267,6 +280,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = szero acc = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -282,16 +296,19 @@ contains
else if (tra) then else if (tra) then
if (beta == szero) then if (beta == szero) then
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = szero y(i) = szero
end do end do
else if (beta == sone) then else if (beta == sone) then
! Do nothing ! Do nothing
else if (beta == -sone) then else if (beta == -sone) then
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = -y(i) y(i) = -y(i)
end do end do
else else
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = beta*y(i) y(i) = beta*y(i)
end do end do
@ -476,16 +493,18 @@ contains
real(psb_spk_), intent(inout) :: y(ldy,*) real(psb_spk_), intent(inout) :: y(ldy,*)
logical, intent(in) :: is_triangle,is_unit,tra,ctra logical, intent(in) :: is_triangle,is_unit,tra,ctra
real(psb_spk_), intent(inout) :: acc(*) real(psb_spk_), intent(inout) :: acc(:)
integer(psb_ipk_) :: i,j, ir integer(psb_ipk_) :: i,j, ir
if (alpha == szero) then if (alpha == szero) then
if (beta == szero) then if (beta == szero) then
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i,1:nc) = szero y(i,1:nc) = szero
enddo enddo
else else
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i,1:nc) = beta*y(i,1:nc) y(i,1:nc) = beta*y(i,1:nc)
end do end do
@ -497,6 +516,7 @@ contains
if (beta == szero) then if (beta == szero) then
if (alpha == sone) then if (alpha == sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -507,6 +527,7 @@ contains
else if (alpha == -sone) then else if (alpha == -sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -517,6 +538,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -531,6 +553,7 @@ contains
else if (beta == sone) then else if (beta == sone) then
if (alpha == sone) then if (alpha == sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -541,6 +564,7 @@ contains
else if (alpha == -sone) then else if (alpha == -sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -551,6 +575,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -564,6 +589,7 @@ contains
else if (beta == -sone) then else if (beta == -sone) then
if (alpha == sone) then if (alpha == sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -574,6 +600,7 @@ contains
else if (alpha == -sone) then else if (alpha == -sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -584,6 +611,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -597,6 +625,7 @@ contains
else else
if (alpha == sone) then if (alpha == sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -607,6 +636,7 @@ contains
else if (alpha == -sone) then else if (alpha == -sone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -617,6 +647,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = szero acc(1:nc) = szero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1

@ -130,10 +130,12 @@ contains
if (alpha == zzero) then if (alpha == zzero) then
if (beta == zzero) then if (beta == zzero) then
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i) = zzero y(i) = zzero
enddo enddo
else else
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i) = beta*y(i) y(i) = beta*y(i)
end do end do
@ -147,6 +149,7 @@ contains
if (beta == zzero) then if (beta == zzero) then
if (alpha == zone) then if (alpha == zone) then
!$omp parallel do private(i,j, acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -157,6 +160,7 @@ contains
else if (alpha == -zone) then else if (alpha == -zone) then
!$omp parallel do private(i,j, acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -167,6 +171,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -181,6 +186,7 @@ contains
else if (beta == zone) then else if (beta == zone) then
if (alpha == zone) then if (alpha == zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -191,6 +197,7 @@ contains
else if (alpha == -zone) then else if (alpha == -zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -201,6 +208,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -214,6 +222,7 @@ contains
else if (beta == -zone) then else if (beta == -zone) then
if (alpha == zone) then if (alpha == zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -224,6 +233,7 @@ contains
else if (alpha == -zone) then else if (alpha == -zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -234,6 +244,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -247,6 +258,7 @@ contains
else else
if (alpha == zone) then if (alpha == zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -257,6 +269,7 @@ contains
else if (alpha == -zone) then else if (alpha == -zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -267,6 +280,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc = zzero acc = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -282,16 +296,19 @@ contains
else if (tra) then else if (tra) then
if (beta == zzero) then if (beta == zzero) then
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = zzero y(i) = zzero
end do end do
else if (beta == zone) then else if (beta == zone) then
! Do nothing ! Do nothing
else if (beta == -zone) then else if (beta == -zone) then
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = -y(i) y(i) = -y(i)
end do end do
else else
!$omp parallel do private(i)
do i=1, m do i=1, m
y(i) = beta*y(i) y(i) = beta*y(i)
end do end do
@ -476,16 +493,18 @@ contains
complex(psb_dpk_), intent(inout) :: y(ldy,*) complex(psb_dpk_), intent(inout) :: y(ldy,*)
logical, intent(in) :: is_triangle,is_unit,tra,ctra logical, intent(in) :: is_triangle,is_unit,tra,ctra
complex(psb_dpk_), intent(inout) :: acc(*) complex(psb_dpk_), intent(inout) :: acc(:)
integer(psb_ipk_) :: i,j, ir integer(psb_ipk_) :: i,j, ir
if (alpha == zzero) then if (alpha == zzero) then
if (beta == zzero) then if (beta == zzero) then
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i,1:nc) = zzero y(i,1:nc) = zzero
enddo enddo
else else
!$omp parallel do private(i)
do i = 1, m do i = 1, m
y(i,1:nc) = beta*y(i,1:nc) y(i,1:nc) = beta*y(i,1:nc)
end do end do
@ -497,6 +516,7 @@ contains
if (beta == zzero) then if (beta == zzero) then
if (alpha == zone) then if (alpha == zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -507,6 +527,7 @@ contains
else if (alpha == -zone) then else if (alpha == -zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -517,6 +538,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -531,6 +553,7 @@ contains
else if (beta == zone) then else if (beta == zone) then
if (alpha == zone) then if (alpha == zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -541,6 +564,7 @@ contains
else if (alpha == -zone) then else if (alpha == -zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -551,6 +575,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -564,6 +589,7 @@ contains
else if (beta == -zone) then else if (beta == -zone) then
if (alpha == zone) then if (alpha == zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -574,6 +600,7 @@ contains
else if (alpha == -zone) then else if (alpha == -zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -584,6 +611,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -597,6 +625,7 @@ contains
else else
if (alpha == zone) then if (alpha == zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -607,6 +636,7 @@ contains
else if (alpha == -zone) then else if (alpha == -zone) then
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1
@ -617,6 +647,7 @@ contains
else else
!$omp parallel do private(i,j,acc)
do i=1,m do i=1,m
acc(1:nc) = zzero acc(1:nc) = zzero
do j=irp(i), irp(i+1)-1 do j=irp(i), irp(i+1)-1

Loading…
Cancel
Save