mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-21 05:12:13 +00:00
Reworked all the sorting routines from templates.
Also merged blsrch into gen_block_map_mod, where it belongs.
This commit is contained in:
@@ -44,6 +44,15 @@ module psb_c_sort_mod
|
||||
use psb_const_mod
|
||||
|
||||
|
||||
interface psb_msort_unique
|
||||
subroutine psb_cmsort_u(x,nout,dir)
|
||||
import
|
||||
complex(psb_spk_), intent(inout) :: x(:)
|
||||
integer(psb_ipk_), intent(out) :: nout
|
||||
integer(psb_ipk_), optional, intent(in) :: dir
|
||||
end subroutine psb_cmsort_u
|
||||
end interface psb_msort_unique
|
||||
|
||||
type psb_c_heap
|
||||
integer(psb_ipk_) :: last, dir
|
||||
complex(psb_spk_), allocatable :: keys(:)
|
||||
|
||||
@@ -44,6 +44,15 @@ module psb_d_sort_mod
|
||||
use psb_const_mod
|
||||
|
||||
|
||||
interface psb_msort_unique
|
||||
subroutine psb_dmsort_u(x,nout,dir)
|
||||
import
|
||||
real(psb_dpk_), intent(inout) :: x(:)
|
||||
integer(psb_ipk_), intent(out) :: nout
|
||||
integer(psb_ipk_), optional, intent(in) :: dir
|
||||
end subroutine psb_dmsort_u
|
||||
end interface psb_msort_unique
|
||||
|
||||
type psb_d_heap
|
||||
integer(psb_ipk_) :: last, dir
|
||||
real(psb_dpk_), allocatable :: keys(:)
|
||||
@@ -79,6 +88,26 @@ module psb_d_sort_mod
|
||||
end subroutine psb_dmsort
|
||||
end interface psb_msort
|
||||
|
||||
|
||||
interface psb_bsrch
|
||||
function psb_dbsrch(key,n,v) result(ipos)
|
||||
import
|
||||
integer(psb_ipk_) :: ipos, n
|
||||
real(psb_dpk_) :: key
|
||||
real(psb_dpk_) :: v(:)
|
||||
end function psb_dbsrch
|
||||
end interface psb_bsrch
|
||||
|
||||
interface psb_ssrch
|
||||
function psb_dssrch(key,n,v) result(ipos)
|
||||
import
|
||||
implicit none
|
||||
integer(psb_ipk_) :: ipos, n
|
||||
real(psb_dpk_) :: key
|
||||
real(psb_dpk_) :: v(:)
|
||||
end function psb_dssrch
|
||||
end interface psb_ssrch
|
||||
|
||||
interface
|
||||
subroutine psi_d_msort_up(n,k,l,iret)
|
||||
import
|
||||
|
||||
@@ -43,30 +43,6 @@
|
||||
module psb_i_sort_mod
|
||||
use psb_const_mod
|
||||
|
||||
interface psb_iblsrch
|
||||
function psb_iblsrch(key,n,v) result(ipos)
|
||||
import :: psb_ipk_
|
||||
integer(psb_ipk_) :: ipos, key, n
|
||||
integer(psb_ipk_) :: v(:)
|
||||
end function psb_iblsrch
|
||||
end interface psb_iblsrch
|
||||
|
||||
interface psb_ibsrch
|
||||
function psb_ibsrch(key,n,v) result(ipos)
|
||||
import :: psb_ipk_
|
||||
integer(psb_ipk_) :: ipos, key, n
|
||||
integer(psb_ipk_) :: v(:)
|
||||
end function psb_ibsrch
|
||||
end interface psb_ibsrch
|
||||
|
||||
interface psb_issrch
|
||||
function psb_issrch(key,n,v) result(ipos)
|
||||
import :: psb_ipk_
|
||||
implicit none
|
||||
integer(psb_ipk_) :: ipos, key, n
|
||||
integer(psb_ipk_) :: v(:)
|
||||
end function psb_issrch
|
||||
end interface psb_issrch
|
||||
|
||||
interface psb_isaperm
|
||||
logical function psb_isaperm(n,eip)
|
||||
@@ -76,9 +52,10 @@ module psb_i_sort_mod
|
||||
end function psb_isaperm
|
||||
end interface psb_isaperm
|
||||
|
||||
|
||||
interface psb_msort_unique
|
||||
subroutine psb_imsort_u(x,nout,dir)
|
||||
import :: psb_ipk_, psb_spk_, psb_dpk_
|
||||
import
|
||||
integer(psb_ipk_), intent(inout) :: x(:)
|
||||
integer(psb_ipk_), intent(out) :: nout
|
||||
integer(psb_ipk_), optional, intent(in) :: dir
|
||||
@@ -120,6 +97,26 @@ module psb_i_sort_mod
|
||||
end subroutine psb_imsort
|
||||
end interface psb_msort
|
||||
|
||||
|
||||
interface psb_bsrch
|
||||
function psb_ibsrch(key,n,v) result(ipos)
|
||||
import
|
||||
integer(psb_ipk_) :: ipos, n
|
||||
integer(psb_ipk_) :: key
|
||||
integer(psb_ipk_) :: v(:)
|
||||
end function psb_ibsrch
|
||||
end interface psb_bsrch
|
||||
|
||||
interface psb_ssrch
|
||||
function psb_issrch(key,n,v) result(ipos)
|
||||
import
|
||||
implicit none
|
||||
integer(psb_ipk_) :: ipos, n
|
||||
integer(psb_ipk_) :: key
|
||||
integer(psb_ipk_) :: v(:)
|
||||
end function psb_issrch
|
||||
end interface psb_ssrch
|
||||
|
||||
interface
|
||||
subroutine psi_i_msort_up(n,k,l,iret)
|
||||
import
|
||||
|
||||
@@ -44,6 +44,15 @@ module psb_s_sort_mod
|
||||
use psb_const_mod
|
||||
|
||||
|
||||
interface psb_msort_unique
|
||||
subroutine psb_smsort_u(x,nout,dir)
|
||||
import
|
||||
real(psb_spk_), intent(inout) :: x(:)
|
||||
integer(psb_ipk_), intent(out) :: nout
|
||||
integer(psb_ipk_), optional, intent(in) :: dir
|
||||
end subroutine psb_smsort_u
|
||||
end interface psb_msort_unique
|
||||
|
||||
type psb_s_heap
|
||||
integer(psb_ipk_) :: last, dir
|
||||
real(psb_spk_), allocatable :: keys(:)
|
||||
@@ -79,6 +88,26 @@ module psb_s_sort_mod
|
||||
end subroutine psb_smsort
|
||||
end interface psb_msort
|
||||
|
||||
|
||||
interface psb_bsrch
|
||||
function psb_sbsrch(key,n,v) result(ipos)
|
||||
import
|
||||
integer(psb_ipk_) :: ipos, n
|
||||
real(psb_spk_) :: key
|
||||
real(psb_spk_) :: v(:)
|
||||
end function psb_sbsrch
|
||||
end interface psb_bsrch
|
||||
|
||||
interface psb_ssrch
|
||||
function psb_sssrch(key,n,v) result(ipos)
|
||||
import
|
||||
implicit none
|
||||
integer(psb_ipk_) :: ipos, n
|
||||
real(psb_spk_) :: key
|
||||
real(psb_spk_) :: v(:)
|
||||
end function psb_sssrch
|
||||
end interface psb_ssrch
|
||||
|
||||
interface
|
||||
subroutine psi_s_msort_up(n,k,l,iret)
|
||||
import
|
||||
|
||||
@@ -44,6 +44,15 @@ module psb_z_sort_mod
|
||||
use psb_const_mod
|
||||
|
||||
|
||||
interface psb_msort_unique
|
||||
subroutine psb_zmsort_u(x,nout,dir)
|
||||
import
|
||||
complex(psb_dpk_), intent(inout) :: x(:)
|
||||
integer(psb_ipk_), intent(out) :: nout
|
||||
integer(psb_ipk_), optional, intent(in) :: dir
|
||||
end subroutine psb_zmsort_u
|
||||
end interface psb_msort_unique
|
||||
|
||||
type psb_z_heap
|
||||
integer(psb_ipk_) :: last, dir
|
||||
complex(psb_dpk_), allocatable :: keys(:)
|
||||
|
||||
Reference in New Issue
Block a user