Skip to content

Commit

Permalink
remove forall not supported by nvfortran & small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvesz committed Apr 2, 2024
1 parent fdc148b commit ec22057
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/fsparse_conversions.f90
Original file line number Diff line number Diff line change
Expand Up @@ -459,4 +459,4 @@ subroutine csr2coo_cdp(CSR,COO)
end subroutine


end module fsparse_conversions
end module fsparse_conversions
10 changes: 1 addition & 9 deletions src/fsparse_matrix_gallery.f90
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@ module fsparse_matrix_gallery
procedure :: set => set_value_csc_cdp
end type

type, extends(CSC_t) :: CSCc32_t
complex(sp), allocatable :: data(:) !! single precision values
end type

type, extends(CSC_t) :: CSCc64_t
complex(dp), allocatable :: data(:) !! double precision values
end type

!! Compressed ELLPACK
type, public, extends(sparse_t) :: ELL_t
integer :: K = 0 !! maximum number of nonzeros per row
Expand Down Expand Up @@ -910,4 +902,4 @@ subroutine set_value_ell_cdp(self,val,ik,jk)
end subroutine


end module fsparse_matrix_gallery
end module fsparse_matrix_gallery
16 changes: 12 additions & 4 deletions src/fsparse_sort.f90
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ subroutine sort_coo_unique_sp( a, data, n, num_rows, num_cols )
end do
!---------------------------------------------------------
! Remove duplicates
forall(ed=1:n) a(1:2,ed) = [rows_(ed),cols_(ed)]
do ed = 1,n
a(1:2,ed) = [rows_(ed),cols_(ed)]
end do
data(1:n) = temp(1:n)
stride = 0
do ed = 2, n
Expand Down Expand Up @@ -320,7 +322,9 @@ subroutine sort_coo_unique_dp( a, data, n, num_rows, num_cols )
end do
!---------------------------------------------------------
! Remove duplicates
forall(ed=1:n) a(1:2,ed) = [rows_(ed),cols_(ed)]
do ed = 1,n
a(1:2,ed) = [rows_(ed),cols_(ed)]
end do
data(1:n) = temp(1:n)
stride = 0
do ed = 2, n
Expand Down Expand Up @@ -378,7 +382,9 @@ subroutine sort_coo_unique_csp( a, data, n, num_rows, num_cols )
end do
!---------------------------------------------------------
! Remove duplicates
forall(ed=1:n) a(1:2,ed) = [rows_(ed),cols_(ed)]
do ed = 1,n
a(1:2,ed) = [rows_(ed),cols_(ed)]
end do
data(1:n) = temp(1:n)
stride = 0
do ed = 2, n
Expand Down Expand Up @@ -436,7 +442,9 @@ subroutine sort_coo_unique_cdp( a, data, n, num_rows, num_cols )
end do
!---------------------------------------------------------
! Remove duplicates
forall(ed=1:n) a(1:2,ed) = [rows_(ed),cols_(ed)]
do ed = 1,n
a(1:2,ed) = [rows_(ed),cols_(ed)]
end do
data(1:n) = temp(1:n)
stride = 0
do ed = 2, n
Expand Down
4 changes: 3 additions & 1 deletion src/fsparse_sort.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ module fsparse_sort
end do
!---------------------------------------------------------
! Remove duplicates
forall(ed=1:n) a(1:2,ed) = [rows_(ed),cols_(ed)]
do ed = 1,n
a(1:2,ed) = [rows_(ed),cols_(ed)]
end do
data(1:n) = temp(1:n)
stride = 0
do ed = 2, n
Expand Down

0 comments on commit ec22057

Please sign in to comment.