1
1
! Copyright (c), The Regents of the University of California
2
2
! Terms of use are as specified in LICENSE.txt
3
+
4
+ #include " assert_macros.h"
5
+
3
6
submodule(prif:prif_private_s) co_reduce_s
4
7
use iso_c_binding, only : &
5
8
c_loc, c_funloc, c_associated, c_f_pointer, c_f_procpointer, c_char, c_double, &
6
9
c_float, c_int32_t
10
+ use assert_m
7
11
8
12
implicit none
9
13
@@ -83,7 +87,7 @@ pure function c_double_complex_operation(lhs, rhs) result(lhs_op_rhs)
83
87
procedure (c_double_complex_operation), pointer :: double_complex_op = > null ()
84
88
85
89
if (present (stat)) stat= 0
86
- call assert (c_associated(operation), " caf_co_reduce: c_associated(operation)" )
90
+ call_assert_describe (c_associated(operation), " caf_co_reduce: c_associated(operation)" )
87
91
88
92
if (caf_same_cfi_type(a, 0 )) then
89
93
call c_f_procpointer(operation, int32_op)
@@ -135,7 +139,7 @@ subroutine Coll_ReduceSub_c_int32_t(arg1, arg2_and_out, count, cdata) bind(C)
135
139
integer (c_int32_t), pointer :: lhs(:)= >null (), rhs_and_result(:)= >null ()
136
140
integer (c_size_t) i
137
141
138
- call assert (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_int32_t: operands associated" )
142
+ call_assert_describe (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_int32_t: operands associated" )
139
143
140
144
call c_f_pointer(arg1, lhs, [count])
141
145
call c_f_pointer(arg2_and_out, rhs_and_result, [count])
@@ -153,7 +157,7 @@ subroutine Coll_ReduceSub_c_int64_t(arg1, arg2_and_out, count, cdata) bind(C)
153
157
integer (c_int64_t), pointer :: lhs(:)= >null (), rhs_and_result(:)= >null ()
154
158
integer (c_size_t) i
155
159
156
- call assert (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_int64_t: operands associated" )
160
+ call_assert_describe (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_int64_t: operands associated" )
157
161
158
162
call c_f_pointer(arg1, lhs, [count])
159
163
call c_f_pointer(arg2_and_out, rhs_and_result, [count])
@@ -171,7 +175,7 @@ subroutine Coll_ReduceSub_c_double(arg1, arg2_and_out, count, cdata) bind(C)
171
175
real (c_double), pointer :: lhs(:)= >null (), rhs_and_result(:)= >null ()
172
176
integer (c_size_t) i
173
177
174
- call assert (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_double: operands associated" )
178
+ call_assert_describe (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_double: operands associated" )
175
179
176
180
call c_f_pointer(arg1, lhs, [count])
177
181
call c_f_pointer(arg2_and_out, rhs_and_result, [count])
@@ -189,7 +193,7 @@ subroutine Coll_ReduceSub_c_float(arg1, arg2_and_out, count, cdata) bind(C)
189
193
real (c_float), pointer :: lhs(:)= >null (), rhs_and_result(:)= >null ()
190
194
integer (c_size_t) i
191
195
192
- call assert (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_float: operands associated" )
196
+ call_assert_describe (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_float: operands associated" )
193
197
194
198
call c_f_pointer(arg1, lhs, [count])
195
199
call c_f_pointer(arg2_and_out, rhs_and_result, [count])
@@ -207,7 +211,7 @@ subroutine Coll_ReduceSub_c_double_complex(arg1, arg2_and_out, count, cdata) bin
207
211
complex (c_double), pointer :: lhs(:)= >null (), rhs_and_result(:)= >null ()
208
212
integer (c_size_t) i
209
213
210
- call assert (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_dobule_complex: operands associated" )
214
+ call_assert_describe (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_dobule_complex: operands associated" )
211
215
212
216
call c_f_pointer(arg1, lhs, [count])
213
217
call c_f_pointer(arg2_and_out, rhs_and_result, [count])
@@ -225,7 +229,7 @@ subroutine Coll_ReduceSub_c_float_complex(arg1, arg2_and_out, count, cdata) bind
225
229
complex (c_float), pointer :: lhs(:)= >null (), rhs_and_result(:)= >null ()
226
230
integer (c_size_t) i
227
231
228
- call assert (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_float_complex: operands associated" )
232
+ call_assert_describe (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_float_complex: operands associated" )
229
233
230
234
call c_f_pointer(arg1, lhs, [count])
231
235
call c_f_pointer(arg2_and_out, rhs_and_result, [count])
@@ -243,7 +247,7 @@ subroutine Coll_ReduceSub_c_bool(arg1, arg2_and_out, count, cdata) bind(C)
243
247
logical (c_bool), pointer :: lhs(:)= >null (), rhs_and_result(:)= >null ()
244
248
integer (c_size_t) i
245
249
246
- call assert (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_bool: operands associated" )
250
+ call_assert_describe (all ([c_associated(arg1), c_associated(arg2_and_out)]), " Coll_ReduceSub_c_bool: operands associated" )
247
251
248
252
call c_f_pointer(arg1, lhs, [count])
249
253
call c_f_pointer(arg2_and_out, rhs_and_result, [count])
@@ -262,7 +266,7 @@ subroutine Coll_ReduceSub_c_char(arg1, arg2_and_out, count, cdata) bind(C)
262
266
integer (c_int), pointer :: arglen= >null ()
263
267
264
268
associate(c_associated_args = > [c_associated(arg1), c_associated(arg2_and_out), c_associated(cdata)])
265
- call assert (all (c_associated_args), " Coll_ReduceSub_c_char: all(c_associated_args)" )
269
+ call_assert_describe (all (c_associated_args), " Coll_ReduceSub_c_char: all(c_associated_args)" )
266
270
end associate
267
271
268
272
call c_f_pointer(cdata, arglen)
0 commit comments