You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
psblas3/test/serial/psb_d_rsb_mat_mod.F03

27 lines
615 B
Fortran

module psb_d_rsb_mat_mod
use psb_d_base_mat_mod
use rsb_mod
#ifdef HAVE_LIBRSB
use iso_c_binding
#endif
type, extends(psb_d_base_sparse_mat) :: psb_d_rsb_sparse_mat
#ifdef HAVE_LIBRSB
type(c_ptr) :: rsbmptr
contains
procedure, pass(a) :: get_nzeros => d_rsb_get_nzeros
#endif
end type
private :: d_rsb_get_nzeros
#ifdef HAVE_LIBRSB
contains
function d_rsb_get_nzeros(a) result(res)
implicit none
class(psb_d_rsb_sparse_mat), intent(in) :: a
integer :: res
res = rsb_get_matrix_nnz(a%rsbmptr)
end function d_rsb_get_nzeros
#endif
end module psb_d_rsb_mat_mod