Neko 1.99.3
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
hip_math.f90
Go to the documentation of this file.
1! Copyright (c) 2024-2025, The Neko Authors
2! All rights reserved.
3!
4! Redistribution and use in source and binary forms, with or without
5! modification, are permitted provided that the following conditions
6! are met:
7!
8! * Redistributions of source code must retain the above copyright
9! notice, this list of conditions and the following disclaimer.
10!
11! * Redistributions in binary form must reproduce the above
12! copyright notice, this list of conditions and the following
13! disclaimer in the documentation and/or other materials provided
14! with the distribution.
15!
16! * Neither the name of the authors nor the names of its
17! contributors may be used to endorse or promote products derived
18! from this software without specific prior written permission.
19!
20! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31! POSSIBILITY OF SUCH DAMAGE.
32!
34 use num_types, only : rp, c_rp
35 implicit none
36 public
37
38 interface
39 subroutine hip_copy(a_d, b_d, n, strm) &
40 bind(c, name = 'hip_copy')
41 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
42 type(c_ptr), value :: a_d, b_d, strm
43 integer(c_int) :: n
44 end subroutine hip_copy
45
46 subroutine hip_masked_copy_0(a_d, b_d, mask_d, n, n_mask, strm) &
47 bind(c, name = 'hip_masked_copy_0')
48 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
49 type(c_ptr), value :: a_d, b_d, mask_d, strm
50 integer(c_int) :: n, n_mask
51 end subroutine hip_masked_copy_0
52
53 subroutine hip_masked_copy_aligned(a_d, b_d, mask_d, n, n_mask, strm) &
54 bind(c, name = 'hip_masked_copy_aligned')
55 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
56 type(c_ptr), value :: a_d, b_d, mask_d, strm
57 integer(c_int) :: n, n_mask
58 end subroutine hip_masked_copy_aligned
59
60 subroutine hip_masked_gather_copy(a_d, b_d, mask_d, n, n_mask, strm) &
61 bind(c, name = 'hip_masked_gather_copy')
62 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
63 type(c_ptr), value :: a_d, b_d, mask_d, strm
64 integer(c_int) :: n, n_mask
65 end subroutine hip_masked_gather_copy
66
67 subroutine hip_masked_gather_copy_aligned(a_d, b_d, mask_d, n, n_mask, &
68 strm) bind(c, name = 'hip_masked_gather_copy_aligned')
69 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
70 type(c_ptr), value :: a_d, b_d, mask_d, strm
71 integer(c_int) :: n, n_mask
73
74 subroutine hip_face_masked_gather_copy(a_d, b_d, mask_d, facet_d, n1, &
75 n2, lx, ly, lz, n_mask, strm) &
76 bind(c, name = 'hip_face_masked_gather_copy')
77 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
78 type(c_ptr), value :: a_d, b_d, mask_d, facet_d, strm
79 integer(c_int) :: n1, n2, lx, ly, lz, n_mask
80 end subroutine hip_face_masked_gather_copy
81
82 subroutine hip_masked_scatter_copy(a_d, b_d, mask_d, n, n_mask, strm) &
83 bind(c, name = 'hip_masked_scatter_copy')
84 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
85 type(c_ptr), value :: a_d, b_d, mask_d, strm
86 integer(c_int) :: n, n_mask
87 end subroutine hip_masked_scatter_copy
88
89 subroutine hip_masked_scatter_copy_aligned(a_d, b_d, mask_d, n, n_mask, strm) &
90 bind(c, name = 'hip_masked_scatter_copy_aligned')
91 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
92 type(c_ptr), value :: a_d, b_d, mask_d, strm
93 integer(c_int) :: n, n_mask
95
96 subroutine hip_masked_atomic_reduction(a_d, b_d, mask_d, n, m, strm) &
97 bind(c, name = 'hip_masked_atomic_reduction')
98 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
99 type(c_ptr), value :: a_d, b_d, mask_d, strm
100 integer(c_int) :: n, m
101 end subroutine hip_masked_atomic_reduction
102
103 subroutine hip_cfill_mask(a_d, c, n, mask_d, n_mask, strm) &
104 bind(c, name = 'hip_cfill_mask')
105 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
106 import c_rp
107 type(c_ptr), value :: a_d
108 real(c_rp) :: c
109 integer(c_int) :: n
110 type(c_ptr), value :: mask_d
111 integer(c_int) :: n_mask
112 type(c_ptr), value :: strm
113 end subroutine hip_cfill_mask
114
115 subroutine hip_cmult(a_d, c, n, strm) &
116 bind(c, name = 'hip_cmult')
117 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
118 import c_rp
119 type(c_ptr), value :: a_d, strm
120 real(c_rp) :: c
121 integer(c_int) :: n
122 end subroutine hip_cmult
123
124 subroutine hip_cmult2(a_d, b_d, c, n, strm) &
125 bind(c, name = 'hip_cmult2')
126 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
127 import c_rp
128 type(c_ptr), value :: a_d, b_d, strm
129 real(c_rp) :: c
130 integer(c_int) :: n
131 end subroutine hip_cmult2
132
133 subroutine hip_cdiv(a_d, c, n, strm) &
134 bind(c, name = 'hip_cdiv')
135 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
136 import c_rp
137 type(c_ptr), value :: a_d, strm
138 real(c_rp) :: c
139 integer(c_int) :: n
140 end subroutine hip_cdiv
141
142 subroutine hip_cdiv2(a_d, b_d, c, n, strm) &
143 bind(c, name = 'hip_cdiv2')
144 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
145 import c_rp
146 type(c_ptr), value :: a_d, b_d, strm
147 real(c_rp) :: c
148 integer(c_int) :: n
149 end subroutine hip_cdiv2
150
151 subroutine hip_radd(a_d, c, n, strm) &
152 bind(c, name = 'hip_radd')
153 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
154 import c_rp
155 type(c_ptr), value :: a_d, strm
156 real(c_rp) :: c
157 integer(c_int) :: n
158 end subroutine hip_radd
159
160 subroutine hip_cadd2(a_d, b_d, c, n, strm) &
161 bind(c, name = 'hip_cadd2')
162 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
163 import c_rp
164 type(c_ptr), value :: a_d
165 type(c_ptr), value :: b_d
166 type(c_ptr), value :: strm
167 real(c_rp) :: c
168 integer(c_int) :: n
169 end subroutine hip_cadd2
170
171 subroutine hip_cwrap(a_d, min_val, max_val, n, strm) &
172 bind(c, name = 'hip_cwrap')
173 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
174 import c_rp
175 type(c_ptr), value :: a_d
176 type(c_ptr), value :: strm
177 real(c_rp) :: min_val
178 real(c_rp) :: max_val
179 integer(c_int) :: n
180 end subroutine hip_cwrap
181
182 subroutine hip_cfill(a_d, c, n, strm) &
183 bind(c, name = 'hip_cfill')
184 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
185 import c_rp
186 type(c_ptr), value :: a_d, strm
187 real(c_rp) :: c
188 integer(c_int) :: n
189 end subroutine hip_cfill
190
191 subroutine hip_rzero(a_d, n, strm) &
192 bind(c, name = 'hip_rzero')
193 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
194 type(c_ptr), value :: a_d, strm
195 integer(c_int) :: n
196 end subroutine hip_rzero
197
198 subroutine hip_add2(a_d, b_d, n, strm) &
199 bind(c, name = 'hip_add2')
200 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
201 import c_rp
202 type(c_ptr), value :: a_d, b_d, strm
203 integer(c_int) :: n
204 end subroutine hip_add2
205
206 subroutine hip_add4(a_d, b_d, c_d, d_d, n, strm) &
207 bind(c, name = 'hip_add4')
208 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
209 import c_rp
210 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
211 integer(c_int) :: n
212 end subroutine hip_add4
213
214 subroutine hip_add2s1(a_d, b_d, c1, n, strm) &
215 bind(c, name = 'hip_add2s1')
216 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
217 import c_rp
218 type(c_ptr), value :: a_d, b_d, strm
219 real(c_rp) :: c1
220 integer(c_int) :: n
221 end subroutine hip_add2s1
222
223 subroutine hip_add2s2(a_d, b_d, c1, n, strm) &
224 bind(c, name = 'hip_add2s2')
225 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
226 import c_rp
227 type(c_ptr), value :: a_d, b_d, strm
228 real(c_rp) :: c1
229 integer(c_int) :: n
230 end subroutine hip_add2s2
231
232 subroutine hip_addsqr2s2(a_d, b_d, c1, n, strm) &
233 bind(c, name = 'hip_addsqr2s2')
234 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
235 import c_rp
236 type(c_ptr), value :: a_d, b_d, strm
237 real(c_rp) :: c1
238 integer(c_int) :: n
239 end subroutine hip_addsqr2s2
240
241 subroutine hip_add3s2(a_d, b_d, c_d, c1, c2, n, strm) &
242 bind(c, name = 'hip_add3s2')
243 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
244 import c_rp
245 type(c_ptr), value :: a_d, b_d, c_d, strm
246 real(c_rp) :: c1, c2
247 integer(c_int) :: n
248 end subroutine hip_add3s2
249
250 subroutine hip_add4s3(a_d, b_d, c_d, d_d, c1, c2, c3, n, strm) &
251 bind(c, name = 'hip_add4s3')
252 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
253 import c_rp
254 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
255 real(c_rp) :: c1, c2, c3
256 integer(c_int) :: n
257 end subroutine hip_add4s3
258
259 subroutine hip_add5s4(a_d, b_d, c_d, d_d, e_d, c1, c2, c3, c4, n, strm) &
260 bind(c, name = 'hip_add5s4')
261 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
262 import c_rp
263 type(c_ptr), value :: a_d, b_d, c_d, d_d, e_d, strm
264 real(c_rp) :: c1, c2, c3, c4
265 integer(c_int) :: n
266 end subroutine hip_add5s4
267
268 subroutine hip_invcol1(a_d, n, strm) &
269 bind(c, name = 'hip_invcol1')
270 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
271 type(c_ptr), value :: a_d, strm
272 integer(c_int) :: n
273 end subroutine hip_invcol1
274
275 subroutine hip_invcol2(a_d, b_d, n, strm) &
276 bind(c, name = 'hip_invcol2')
277 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
278 type(c_ptr), value :: a_d, b_d, strm
279 integer(c_int) :: n
280 end subroutine hip_invcol2
281
282 subroutine hip_invcol3(a_d, b_d, c_d, n, strm) &
283 bind(c, name = 'hip_invcol3')
284 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
285 type(c_ptr), value :: a_d, b_d, c_d, strm
286 integer(c_int) :: n
287 end subroutine hip_invcol3
288
289 subroutine hip_col2(a_d, b_d, n, strm) &
290 bind(c, name = 'hip_col2')
291 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
292 type(c_ptr), value :: a_d, b_d, strm
293 integer(c_int) :: n
294 end subroutine hip_col2
295
296 subroutine hip_col3(a_d, b_d, c_d, n, strm) &
297 bind(c, name = 'hip_col3')
298 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
299 type(c_ptr), value :: a_d, b_d, c_d, strm
300 integer(c_int) :: n
301 end subroutine hip_col3
302
303 subroutine hip_subcol3(a_d, b_d, c_d, n, strm) &
304 bind(c, name = 'hip_subcol3')
305 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
306 type(c_ptr), value :: a_d, b_d, c_d, strm
307 integer(c_int) :: n
308 end subroutine hip_subcol3
309
310 subroutine hip_sub2(a_d, b_d, n, strm) &
311 bind(c, name = 'hip_sub2')
312 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
313 type(c_ptr), value :: a_d, b_d, strm
314 integer(c_int) :: n
315 end subroutine hip_sub2
316
317 subroutine hip_sub3(a_d, b_d, c_d, n, strm) &
318 bind(c, name = 'hip_sub3')
319 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
320 type(c_ptr), value :: a_d, b_d, c_d, strm
321 integer(c_int) :: n
322 end subroutine hip_sub3
323
324 subroutine hip_add3(a_d, b_d, c_d, n, strm) &
325 bind(c, name = 'hip_add3')
326 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
327 type(c_ptr), value :: a_d, b_d, c_d, strm
328 integer(c_int) :: n
329 end subroutine hip_add3
330
331 subroutine hip_addcol3(a_d, b_d, c_d, n, strm) &
332 bind(c, name = 'hip_addcol3')
333 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
334 type(c_ptr), value :: a_d, b_d, c_d, strm
335 integer(c_int) :: n
336 end subroutine hip_addcol3
337
338 subroutine hip_addcol4(a_d, b_d, c_d, d_d, n, strm) &
339 bind(c, name = 'hip_addcol4')
340 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
341 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
342 integer(c_int) :: n
343 end subroutine hip_addcol4
344
345 subroutine hip_addcol3s2(a_d, b_d, c_d, s, n, strm) &
346 bind(c, name = 'hip_addcol3s2')
347 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
348 import c_rp
349 type(c_ptr), value :: a_d, b_d, c_d, strm
350 real(c_rp) :: s
351 integer(c_int) :: n
352 end subroutine hip_addcol3s2
353
354 subroutine hip_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm) &
355 bind(c, name = 'hip_vdot3')
356 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
357 type(c_ptr), value :: dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, strm
358 integer(c_int) :: n
359 end subroutine hip_vdot3
360
361 subroutine hip_vcross(u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, &
362 w1_d, w2_d, w3_d, n, strm) &
363 bind(c, name = 'hip_vcross')
364 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
365
366 type(c_ptr), value :: u1_d, u2_d, u3_d
367 type(c_ptr), value :: v1_d, v2_d, v3_d
368 type(c_ptr), value :: w1_d, w2_d, w3_d
369 type(c_ptr), value :: strm
370 integer(c_int) :: n
371 end subroutine hip_vcross
372
373 real(c_rp) function hip_vlsc3(u_d, v_d, w_d, n, strm) &
374 bind(c, name = 'hip_vlsc3')
375 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
376 import c_rp
377 type(c_ptr), value :: u_d, v_d, w_d, strm
378 integer(c_int) :: n
379 end function hip_vlsc3
380
381 subroutine hip_add2s2_many(y_d, x_d_d, a_d, j, n, strm) &
382 bind(c, name = 'hip_add2s2_many')
383 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
384 import c_rp
385 type(c_ptr), value :: y_d, x_d_d, a_d, strm
386 integer(c_int) :: j, n
387 end subroutine hip_add2s2_many
388
389 real(c_rp) function hip_glsc3(a_d, b_d, c_d, n, strm) &
390 bind(c, name = 'hip_glsc3')
391 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
392 import c_rp
393 type(c_ptr), value :: a_d, b_d, c_d, strm
394 integer(c_int) :: n
395 end function hip_glsc3
396
397 subroutine hip_glsc3_many(h, w_d, v_d_d, mult_d, j, n, strm) &
398 bind(c, name = 'hip_glsc3_many')
399 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
400 import c_rp
401 type(c_ptr), value :: w_d, v_d_d, mult_d, strm
402 integer(c_int) :: j, n
403 real(c_rp) :: h(j)
404 end subroutine hip_glsc3_many
405
406 real(c_rp) function hip_glsc2(a_d, b_d, n, strm) &
407 bind(c, name = 'hip_glsc2')
408 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
409 import c_rp
410 type(c_ptr), value :: a_d, b_d, strm
411 integer(c_int) :: n
412 end function hip_glsc2
413
414 real(c_rp) function hip_glsubnorm2(a_d, b_d, n, strm) &
415 bind(c, name = 'hip_glsubnorm2')
416 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
417 import c_rp
418 type(c_ptr), value :: a_d, b_d, strm
419 integer(c_int) :: n
420 end function hip_glsubnorm2
421
422 real(c_rp) function hip_glsum(a_d, n, strm) &
423 bind(c, name = 'hip_glsum')
424 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
425 import c_rp
426 type(c_ptr), value :: a_d, strm
427 integer(c_int) :: n
428 end function hip_glsum
429
430 real(c_rp) function hip_glmax(a_d, ninf, n, strm) &
431 bind(c, name = 'hip_glmax')
432 use, intrinsic :: iso_c_binding, only: c_int, c_ptr
433 import c_rp
434 type(c_ptr), value :: a_d, strm
435 real(c_rp) :: ninf
436 integer(c_int) :: n
437 end function hip_glmax
438
439 real(c_rp) function hip_glmin(a_d, pinf, n, strm) &
440 bind(c, name = 'hip_glmin')
441 use, intrinsic :: iso_c_binding, only: c_int, c_ptr
442 import c_rp
443 type(c_ptr), value :: a_d, strm
444 real(c_rp) :: pinf
445 integer(c_int) :: n
446 end function hip_glmin
447
448 subroutine hip_absval(a_d, n, strm) &
449 bind(c, name = 'hip_absval')
450 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
451 import c_rp
452 type(c_ptr), value :: a_d, strm
453 integer(c_int) :: n
454 end subroutine hip_absval
455 end interface
456
457 ! ========================================================================== !
458 ! Interfaces for the pointwise operations.
459
460 interface
461 subroutine hip_pwmax_vec2(a_d, b_d, n, strm) &
462 bind(c, name = 'hip_pwmax_vec2')
463 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
464 type(c_ptr), value :: a_d, b_d, strm
465 integer(c_int) :: n
466 end subroutine hip_pwmax_vec2
467
468 subroutine hip_pwmax_vec3(a_d, b_d, c_d, n, strm) &
469 bind(c, name = 'hip_pwmax_vec3')
470 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
471 type(c_ptr), value :: a_d, b_d, c_d, strm
472 integer(c_int) :: n
473 end subroutine hip_pwmax_vec3
474
475 subroutine hip_pwmax_sca2(a_d, c_d, n, strm) &
476 bind(c, name = 'hip_pwmax_sca2')
477 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
478 import c_rp
479 type(c_ptr), value :: a_d, strm
480 real(c_rp) :: c_d
481 integer(c_int) :: n
482 end subroutine hip_pwmax_sca2
483
484 subroutine hip_pwmax_sca3(a_d, b_d, c_d, n, strm) &
485 bind(c, name = 'hip_pwmax_sca3')
486 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
487 import c_rp
488 type(c_ptr), value :: a_d, b_d, strm
489 real(c_rp) :: c_d
490 integer(c_int) :: n
491 end subroutine hip_pwmax_sca3
492
493 subroutine hip_pwmin_vec2(a_d, b_d, n, strm) &
494 bind(c, name = 'hip_pwmin_vec2')
495 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
496 type(c_ptr), value :: a_d, b_d, strm
497 integer(c_int) :: n
498 end subroutine hip_pwmin_vec2
499
500 subroutine hip_pwmin_vec3(a_d, b_d, c_d, n, strm) &
501 bind(c, name = 'hip_pwmin_vec3')
502 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
503 type(c_ptr), value :: a_d, b_d, c_d, strm
504 integer(c_int) :: n
505 end subroutine hip_pwmin_vec3
506
507 subroutine hip_pwmin_sca2(a_d, c_d, n, strm) &
508 bind(c, name = 'hip_pwmin_sca2')
509 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
510 import c_rp
511 type(c_ptr), value :: a_d, strm
512 real(c_rp) :: c_d
513 integer(c_int) :: n
514 end subroutine hip_pwmin_sca2
515
516 subroutine hip_pwmin_sca3(a_d, b_d, c_d, n, strm) &
517 bind(c, name = 'hip_pwmin_sca3')
518 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
519 import c_rp
520 type(c_ptr), value :: a_d, b_d, strm
521 real(c_rp) :: c_d
522 integer(c_int) :: n
523 end subroutine hip_pwmin_sca3
524
525 end interface
526
527 ! ========================================================================== !
528 ! Interfaces for integer operations.
529
530 interface
531
532 subroutine hip_iadd(a_d, c, n, strm) &
533 bind(c, name = 'hip_iadd')
534 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
535 import c_rp
536 type(c_ptr), value :: a_d, strm
537 integer(c_int) :: c
538 integer(c_int) :: n
539 end subroutine hip_iadd
540
541 end interface
542end module hip_math
integer, parameter, public c_rp
Definition num_types.f90:13
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12