49 use,
INTRINSIC :: iso_c_binding, only: c_int, c_size_t
56 IMPORT :: c_int, c_size_t
57 INTEGER(c_size_t),
VALUE,
INTENT(in) :: n
58 INTEGER(c_int),
INTENT(inout) :: a(n)
60 MODULE PROCEDURE xt_sort_int_a
66 bind(c, name=
'xt_sort_index_f2c')
68 INTEGER(c_int),
VALUE,
INTENT(in) :: n, reset_positions
69 INTEGER(c_int),
INTENT(inout) :: a(n), positions(n)
71 MODULE PROCEDURE xt_sort_index_a_a_l
76 INTEGER(xt_int_kind) :: idx
83 INTEGER(c_size_t),
VALUE,
INTENT(in) :: n
86 MODULE PROCEDURE xt_sort_idxpos_a
91 SUBROUTINE xt_sort_int_a(a)
92 INTEGER(c_int),
INTENT(inout) :: a(:)
96 END SUBROUTINE xt_sort_int_a
98 SUBROUTINE xt_sort_index_a_a_l(a, positions, reset_positions)
99 INTEGER(c_int),
INTENT(inout) :: a(:), positions(:)
100 LOGICAL,
INTENT(in) :: reset_positions
103 IF (a_size >
SIZE(positions)) &
104 CALL xt_abort(
"positions array too small", &
105 "xt_sort.f90", __line__)
107 merge(1_c_int, 0_c_int, reset_positions))
108 END SUBROUTINE xt_sort_index_a_a_l
110 SUBROUTINE xt_sort_idxpos_a(a)
115 END SUBROUTINE xt_sort_idxpos_a
void xt_sort_index_f2c(Xt_int *a, int n, int *idx, int reset_index)
void xt_sort_int_f2c(int *a, size_t n)
void(* xt_sort_index)(Xt_int *a, int n, int *idx, int reset_index)
integer, parameter, public xt_int_kind
void xt_sort_idxpos_f2c(idxpos_type *a, size_t n)
void(* xt_sort_int)(int *a, size_t n)