base/modules/psb_c_base_mat_mod.f90
 base/modules/psb_c_csc_mat_mod.f90
 base/modules/psb_c_csr_mat_mod.f90
 base/modules/psb_d_base_mat_mod.f90
 base/modules/psb_d_csc_mat_mod.f90
 base/modules/psb_d_csr_mat_mod.f90
 base/modules/psb_s_base_mat_mod.f90
 base/modules/psb_s_csc_mat_mod.f90
 base/modules/psb_s_csr_mat_mod.f90
 base/modules/psb_z_base_mat_mod.f90
 base/modules/psb_z_csc_mat_mod.f90
 base/modules/psb_z_csr_mat_mod.f90


Use psb_size to guard against unallocated ALLOCATABLE components.
psblas3-newdesc
Salvatore Filippone 9 years ago
parent 285d5ff296
commit 58059aaa9f

@ -1752,9 +1752,9 @@ contains
class(psb_c_coo_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8 + 1
res = res + (2*psb_sizeof_sp) * size(a%val)
res = res + psb_sizeof_int * size(a%ia)
res = res + psb_sizeof_int * size(a%ja)
res = res + (2*psb_sizeof_sp) * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%ia)
res = res + psb_sizeof_int * psb_size(a%ja)
end function c_coo_sizeof

@ -521,9 +521,9 @@ contains
class(psb_c_csc_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
res = res + (2*psb_sizeof_sp) * size(a%val)
res = res + psb_sizeof_int * size(a%icp)
res = res + psb_sizeof_int * size(a%ia)
res = res + (2*psb_sizeof_sp) * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%icp)
res = res + psb_sizeof_int * psb_size(a%ia)
end function c_csc_sizeof

@ -526,9 +526,9 @@ contains
class(psb_c_csr_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
res = res + (2*psb_sizeof_sp) * size(a%val)
res = res + psb_sizeof_int * size(a%irp)
res = res + psb_sizeof_int * size(a%ja)
res = res + (2*psb_sizeof_sp) * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%irp)
res = res + psb_sizeof_int * psb_size(a%ja)
end function c_csr_sizeof

@ -1752,9 +1752,9 @@ contains
class(psb_d_coo_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8 + 1
res = res + psb_sizeof_dp * size(a%val)
res = res + psb_sizeof_int * size(a%ia)
res = res + psb_sizeof_int * size(a%ja)
res = res + psb_sizeof_dp * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%ia)
res = res + psb_sizeof_int * psb_size(a%ja)
end function d_coo_sizeof

@ -521,9 +521,9 @@ contains
class(psb_d_csc_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
res = res + psb_sizeof_dp * size(a%val)
res = res + psb_sizeof_int * size(a%icp)
res = res + psb_sizeof_int * size(a%ia)
res = res + psb_sizeof_dp * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%icp)
res = res + psb_sizeof_int * psb_size(a%ia)
end function d_csc_sizeof

@ -526,9 +526,9 @@ contains
class(psb_d_csr_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
res = res + psb_sizeof_dp * size(a%val)
res = res + psb_sizeof_int * size(a%irp)
res = res + psb_sizeof_int * size(a%ja)
res = res + psb_sizeof_dp * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%irp)
res = res + psb_sizeof_int * psb_size(a%ja)
end function d_csr_sizeof

@ -1752,9 +1752,9 @@ contains
class(psb_s_coo_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8 + 1
res = res + psb_sizeof_sp * size(a%val)
res = res + psb_sizeof_int * size(a%ia)
res = res + psb_sizeof_int * size(a%ja)
res = res + psb_sizeof_sp * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%ia)
res = res + psb_sizeof_int * psb_size(a%ja)
end function s_coo_sizeof

@ -521,9 +521,9 @@ contains
class(psb_s_csc_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
res = res + psb_sizeof_sp * size(a%val)
res = res + psb_sizeof_int * size(a%icp)
res = res + psb_sizeof_int * size(a%ia)
res = res + psb_sizeof_sp * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%icp)
res = res + psb_sizeof_int * psb_size(a%ia)
end function s_csc_sizeof

@ -526,9 +526,9 @@ contains
class(psb_s_csr_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
res = res + psb_sizeof_sp * size(a%val)
res = res + psb_sizeof_int * size(a%irp)
res = res + psb_sizeof_int * size(a%ja)
res = res + psb_sizeof_sp * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%irp)
res = res + psb_sizeof_int * psb_size(a%ja)
end function s_csr_sizeof

@ -1752,9 +1752,9 @@ contains
class(psb_z_coo_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8 + 1
res = res + (2*psb_sizeof_dp) * size(a%val)
res = res + psb_sizeof_int * size(a%ia)
res = res + psb_sizeof_int * size(a%ja)
res = res + (2*psb_sizeof_dp) * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%ia)
res = res + psb_sizeof_int * psb_size(a%ja)
end function z_coo_sizeof

@ -521,9 +521,9 @@ contains
class(psb_z_csc_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
res = res + (2*psb_sizeof_dp) * size(a%val)
res = res + psb_sizeof_int * size(a%icp)
res = res + psb_sizeof_int * size(a%ia)
res = res + (2*psb_sizeof_dp) * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%icp)
res = res + psb_sizeof_int * psb_size(a%ia)
end function z_csc_sizeof

@ -526,9 +526,9 @@ contains
class(psb_z_csr_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
res = res + (2*psb_sizeof_dp) * size(a%val)
res = res + psb_sizeof_int * size(a%irp)
res = res + psb_sizeof_int * size(a%ja)
res = res + (2*psb_sizeof_dp) * psb_size(a%val)
res = res + psb_sizeof_int * psb_size(a%irp)
res = res + psb_sizeof_int * psb_size(a%ja)
end function z_csr_sizeof

Loading…
Cancel
Save