psblas2-typext:

Beginning of experiments with type, extends.
psblas3-type-indexed
Salvatore Filippone 17 years ago
parent 866cf36165
commit 5a85af050a

@ -6,11 +6,12 @@
# These lines are quite portable. # These lines are quite portable.
.mod=@MODEXT@ .mod=@MODEXT@
.fh=.fh .fh=.fh
.SUFFIXES: .f90 $(.mod) .F90 .F .SUFFIXES: .f90 $(.mod) .F90 .F .f03 .F03
# The following ones are the variables used by the PSBLAS make scripts. # The following ones are the variables used by the PSBLAS make scripts.
F03=@F90@
F90=@F90@ F90=@F90@
FC=@FC@ FC=@FC@
CC=@CC@ CC=@CC@

@ -120,45 +120,30 @@ module psb_spmat_type
character(len=5) :: psb_fidef_='CSR' character(len=5) :: psb_fidef_='CSR'
type psb_base_spmat_type
type psb_sspmat_type
integer :: m, k integer :: m, k
character(len=5) :: fida character(len=5) :: fida
character(len=11) :: descra character(len=11) :: descra
integer :: infoa(psb_ifasize_) integer :: infoa(psb_ifasize_)
real(psb_spk_), allocatable :: aspk(:)
integer, allocatable :: ia1(:), ia2(:) integer, allocatable :: ia1(:), ia2(:)
integer, allocatable :: pl(:), pr(:) integer, allocatable :: pl(:), pr(:)
end type psb_base_spmat_type
type, extends(psb_base_spmat_type) :: psb_sspmat_type
real(psb_spk_), allocatable :: aspk(:)
end type psb_sspmat_type end type psb_sspmat_type
type psb_cspmat_type type, extends(psb_base_spmat_type) :: psb_cspmat_type
integer :: m, k
character(len=5) :: fida
character(len=11) :: descra
integer :: infoa(psb_ifasize_)
complex(psb_spk_), allocatable :: aspk(:) complex(psb_spk_), allocatable :: aspk(:)
integer, allocatable :: ia1(:), ia2(:)
integer, allocatable :: pl(:), pr(:)
end type psb_cspmat_type end type psb_cspmat_type
type psb_dspmat_type type, extends(psb_base_spmat_type) :: psb_dspmat_type
integer :: m, k
character(len=5) :: fida
character(len=11) :: descra
integer :: infoa(psb_ifasize_)
real(psb_dpk_), allocatable :: aspk(:) real(psb_dpk_), allocatable :: aspk(:)
integer, allocatable :: ia1(:), ia2(:)
integer, allocatable :: pl(:), pr(:)
end type psb_dspmat_type end type psb_dspmat_type
type psb_zspmat_type type, extends(psb_base_spmat_type) :: psb_zspmat_type
integer :: m, k
character(len=5) :: fida
character(len=11) :: descra
integer :: infoa(psb_ifasize_)
complex(psb_dpk_), allocatable :: aspk(:) complex(psb_dpk_), allocatable :: aspk(:)
integer, allocatable :: ia1(:), ia2(:)
integer, allocatable :: pl(:), pr(:)
end type psb_zspmat_type end type psb_zspmat_type
interface psb_nullify_sp interface psb_nullify_sp
@ -464,7 +449,17 @@ contains
psb_get_zsp_nnz_row = 0 psb_get_zsp_nnz_row = 0
end if end if
end function psb_get_zsp_nnz_row end function psb_get_zsp_nnz_row
!!$
!!$ subroutine psb_nullify_base_sp(mat)
!!$ implicit none
!!$ class(psb_base_spmat_type), intent(inout) :: mat
!!$ mat%infoa(:)=0
!!$ mat%m=0
!!$ mat%k=0
!!$ mat%fida=''
!!$ mat%descra=''
!!$
!!$ end subroutine psb_nullify_base_sp
subroutine psb_nullify_ssp(mat) subroutine psb_nullify_ssp(mat)
implicit none implicit none

@ -671,6 +671,10 @@ $(.mod).o:
$(F90) $(F90COPT) $(FINCLUDES) -c $< $(F90) $(F90COPT) $(FINCLUDES) -c $<
%$(.mod): %.f90 %$(.mod): %.f90
$(F90) $(F90COPT) $(FINCLUDES) -c $< $(F90) $(F90COPT) $(FINCLUDES) -c $<
%.o: %.f03
$(F90) $(F90COPT) $(FINCLUDES) -c $<
%$(.mod): %.f03
$(F90) $(F90COPT) $(FINCLUDES) -c $<
%.o: %.F %.o: %.F
$(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $<
%$(.mod): %.F %$(.mod): %.F
@ -679,6 +683,10 @@ $(.mod).o:
$(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<
%$(.mod): %.F90 %$(.mod): %.F90
$(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<'
%.o: %.F03
$(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<
%$(.mod): %.F03
$(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<'
else else
@ -701,6 +709,10 @@ $(.mod).o:
$(F90) $(F90COPT) $(FINCLUDES) -c $< $(F90) $(F90COPT) $(FINCLUDES) -c $<
.f90.o: .f90.o:
$(F90) $(F90COPT) $(FINCLUDES) -c $< $(F90) $(F90COPT) $(FINCLUDES) -c $<
.f03$(.mod):
$(F03) $(F90COPT) $(FINCLUDES) -c $<
.f03.o:
$(F03) $(F90COPT) $(FINCLUDES) -c $<
.F.o: .F.o:
$(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $<
.F$(.mod): .F$(.mod):
@ -709,6 +721,10 @@ $(.mod).o:
$(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<
.F90$(.mod): .F90$(.mod):
$(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<'
.F03.o:
$(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<
.F03$(.mod):
$(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<'
fi fi
AC_SUBST(PSBLASRULES) AC_SUBST(PSBLASRULES)

Loading…
Cancel
Save