35 #include "qrm_common.h"
55 integer :: parent(:), porder(:)
56 integer,
optional :: weight(:)
58 integer,
allocatable :: son(:), brother(:), stack(:)
59 integer ::
i, father, br, head, hp, pp, t, w, next
62 character(len=*),
parameter :: name=
'qrm_analyse'
69 __qrm_check_ret(name,
'qrm_aalloc',9999)
74 if(present(weight))
then
89 if(father .ne. 0)
then
90 brother(
i) = son(father)
99 if (father .ne. 0)
then
116 if (parent(t) .ne. 0) cycle
122 if(son(head) .eq. 0)
then
127 if (parent(head) .ne. 0)
then
128 son(parent(head)) = brother(head)
138 stack(hp) = son(head)
147 __qrm_check_ret(name,
'qrm_adealloc',9999)
154 if(err_act .eq. qrm_abort_)
then
Generic interface for the qrm_adealloc_i, qrm_adealloc_2i, qrm_adealloc_s, qrm_adealloc_2s, qrm_adealloc_3s, qrm_adealloc_d, qrm_adealloc_2d, qrm_adealloc_3d, qrm_adealloc_c, qrm_adealloc_2c, qrm_adealloc_3c, qrm_adealloc_z, qrm_adealloc_2z, qrm_adealloc_3z, routines.
subroutine qrm_err_act_restore(err_act)
Restores the value of the qrm_err_act variable.
subroutine qrm_err_check()
This subroutine checks the errors stack. If something is found all the entries in the stack are poppe...
Generic interface for the qrm_aalloc_i, qrm_aalloc_2i, qrm_aalloc_s, qrm_aalloc_2s, qrm_aalloc_3s, qrm_aalloc_d, qrm_aalloc_2d, qrm_aalloc_3d, qrm_aalloc_c, qrm_aalloc_2c, qrm_aalloc_3c, qrm_aalloc_z, qrm_aalloc_2z, qrm_aalloc_3z, routines.
This module implements the memory handling routines. Pretty mucch allocations and deallocations...
subroutine qrm_postorder(parent, n, porder, weight)
This subroutine computes a postorder by traversing a tree in dfs.
subroutine qrm_err_act_save(err_act)
Saves a copy of the qrm_err_act variable.