8
8
#include " fassert.h"
9
9
10
10
module fortran_comparators
11
- use , intrinsic :: ISO_C_BINDING
12
11
use flc_algorithm, only : INDEX_INT
13
12
implicit none
14
13
public
15
14
contains
16
15
function compare_ge (left , right ) bind(C) &
17
16
result(fresult)
17
+ use , intrinsic :: ISO_C_BINDING
18
18
integer (INDEX_INT), intent (in ), value :: left
19
19
integer (INDEX_INT), intent (in ), value :: right
20
20
logical (C_BOOL) :: fresult
@@ -69,7 +69,6 @@ subroutine test_sort_compare()
69
69
70
70
!- ----------------------------------------------------------------------------!
71
71
subroutine test_argsort ()
72
- use , intrinsic :: ISO_C_BINDING
73
72
use flc_algorithm, only : argsort, INDEX_INT
74
73
implicit none
75
74
integer , dimension (5 ) :: iarr = [ 2 , 5 , - 2 , 3 , - 10000 ]
@@ -95,7 +94,6 @@ subroutine test_argsort()
95
94
96
95
!- ----------------------------------------------------------------------------!
97
96
subroutine test_shuffle ()
98
- use , intrinsic :: ISO_C_BINDING
99
97
use flc_algorithm, only : shuffle
100
98
use flc_random, only : Engine
101
99
implicit none
@@ -112,7 +110,6 @@ subroutine test_shuffle()
112
110
113
111
!- ----------------------------------------------------------------------------!
114
112
subroutine test_binary_search ()
115
- use , intrinsic :: ISO_C_BINDING
116
113
use flc_algorithm, only : binary_search
117
114
implicit none
118
115
integer , dimension (6 ) :: iarr = [ - 5 , 1 , 1 , 2 , 4 , 9 ]
@@ -128,7 +125,6 @@ subroutine test_binary_search()
128
125
129
126
!- ----------------------------------------------------------------------------!
130
127
subroutine test_minmax_element ()
131
- use , intrinsic :: ISO_C_BINDING
132
128
use flc_algorithm, only : minmax_element, INDEX_INT
133
129
implicit none
134
130
integer , dimension (6 ) :: iarr = [ - 5 , 1000 , - 1000 , 999 , - 1000 , 1000 ]
0 commit comments