Neko 1.99.6
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, c_xp
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_sqrt_inplace(a_d, n, strm) &
183 bind(c, name = 'hip_sqrt_inplace')
184 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
185 type(c_ptr), value :: a_d
186 type(c_ptr), value :: strm
187 integer(c_int) :: n
188 end subroutine hip_sqrt_inplace
189
190 subroutine hip_power(ap_d, a_d, p, n, strm) &
191 bind(c, name = 'hip_power')
192 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
193 import c_rp
194 type(c_ptr), value :: ap_d
195 type(c_ptr), value :: a_d
196 type(c_ptr), value :: strm
197 real(c_rp) :: p
198 integer(c_int) :: n
199 end subroutine hip_power
200
201 subroutine hip_cfill(a_d, c, n, strm) &
202 bind(c, name = 'hip_cfill')
203 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
204 import c_rp
205 type(c_ptr), value :: a_d, strm
206 real(c_rp) :: c
207 integer(c_int) :: n
208 end subroutine hip_cfill
209
210 subroutine hip_rzero(a_d, n, strm) &
211 bind(c, name = 'hip_rzero')
212 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
213 type(c_ptr), value :: a_d, strm
214 integer(c_int) :: n
215 end subroutine hip_rzero
216
217 subroutine hip_add2(a_d, b_d, n, strm) &
218 bind(c, name = 'hip_add2')
219 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
220 import c_rp
221 type(c_ptr), value :: a_d, b_d, strm
222 integer(c_int) :: n
223 end subroutine hip_add2
224
225 subroutine hip_add4(a_d, b_d, c_d, d_d, n, strm) &
226 bind(c, name = 'hip_add4')
227 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
228 import c_rp
229 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
230 integer(c_int) :: n
231 end subroutine hip_add4
232
233 subroutine hip_add2s1(a_d, b_d, c1, n, strm) &
234 bind(c, name = 'hip_add2s1')
235 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
236 import c_rp
237 type(c_ptr), value :: a_d, b_d, strm
238 real(c_rp) :: c1
239 integer(c_int) :: n
240 end subroutine hip_add2s1
241
242 subroutine hip_add2s2(a_d, b_d, c1, n, strm) &
243 bind(c, name = 'hip_add2s2')
244 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
245 import c_rp
246 type(c_ptr), value :: a_d, b_d, strm
247 real(c_rp) :: c1
248 integer(c_int) :: n
249 end subroutine hip_add2s2
250
251 subroutine hip_addsqr2s2(a_d, b_d, c1, n, strm) &
252 bind(c, name = 'hip_addsqr2s2')
253 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
254 import c_rp
255 type(c_ptr), value :: a_d, b_d, strm
256 real(c_rp) :: c1
257 integer(c_int) :: n
258 end subroutine hip_addsqr2s2
259
260 subroutine hip_add3s2(a_d, b_d, c_d, c1, c2, n, strm) &
261 bind(c, name = 'hip_add3s2')
262 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
263 import c_rp
264 type(c_ptr), value :: a_d, b_d, c_d, strm
265 real(c_rp) :: c1, c2
266 integer(c_int) :: n
267 end subroutine hip_add3s2
268
269 subroutine hip_add4s3(a_d, b_d, c_d, d_d, c1, c2, c3, n, strm) &
270 bind(c, name = 'hip_add4s3')
271 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
272 import c_rp
273 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
274 real(c_rp) :: c1, c2, c3
275 integer(c_int) :: n
276 end subroutine hip_add4s3
277
278 subroutine hip_add5s4(a_d, b_d, c_d, d_d, e_d, c1, c2, c3, c4, n, strm) &
279 bind(c, name = 'hip_add5s4')
280 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
281 import c_rp
282 type(c_ptr), value :: a_d, b_d, c_d, d_d, e_d, strm
283 real(c_rp) :: c1, c2, c3, c4
284 integer(c_int) :: n
285 end subroutine hip_add5s4
286
287 subroutine hip_invcol1(a_d, n, strm) &
288 bind(c, name = 'hip_invcol1')
289 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
290 type(c_ptr), value :: a_d, strm
291 integer(c_int) :: n
292 end subroutine hip_invcol1
293
294 subroutine hip_invcol2(a_d, b_d, n, strm) &
295 bind(c, name = 'hip_invcol2')
296 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
297 type(c_ptr), value :: a_d, b_d, strm
298 integer(c_int) :: n
299 end subroutine hip_invcol2
300
301 subroutine hip_invcol3(a_d, b_d, c_d, n, strm) &
302 bind(c, name = 'hip_invcol3')
303 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
304 type(c_ptr), value :: a_d, b_d, c_d, strm
305 integer(c_int) :: n
306 end subroutine hip_invcol3
307
308 subroutine hip_col2(a_d, b_d, n, strm) &
309 bind(c, name = 'hip_col2')
310 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
311 type(c_ptr), value :: a_d, b_d, strm
312 integer(c_int) :: n
313 end subroutine hip_col2
314
315 subroutine hip_col3(a_d, b_d, c_d, n, strm) &
316 bind(c, name = 'hip_col3')
317 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
318 type(c_ptr), value :: a_d, b_d, c_d, strm
319 integer(c_int) :: n
320 end subroutine hip_col3
321
322 subroutine hip_subcol3(a_d, b_d, c_d, n, strm) &
323 bind(c, name = 'hip_subcol3')
324 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
325 type(c_ptr), value :: a_d, b_d, c_d, strm
326 integer(c_int) :: n
327 end subroutine hip_subcol3
328
329 subroutine hip_sub2(a_d, b_d, n, strm) &
330 bind(c, name = 'hip_sub2')
331 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
332 type(c_ptr), value :: a_d, b_d, strm
333 integer(c_int) :: n
334 end subroutine hip_sub2
335
336 subroutine hip_sub3(a_d, b_d, c_d, n, strm) &
337 bind(c, name = 'hip_sub3')
338 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
339 type(c_ptr), value :: a_d, b_d, c_d, strm
340 integer(c_int) :: n
341 end subroutine hip_sub3
342
343 subroutine hip_add3(a_d, b_d, c_d, n, strm) &
344 bind(c, name = 'hip_add3')
345 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
346 type(c_ptr), value :: a_d, b_d, c_d, strm
347 integer(c_int) :: n
348 end subroutine hip_add3
349
350 subroutine hip_addcol3(a_d, b_d, c_d, n, strm) &
351 bind(c, name = 'hip_addcol3')
352 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
353 type(c_ptr), value :: a_d, b_d, c_d, strm
354 integer(c_int) :: n
355 end subroutine hip_addcol3
356
357 subroutine hip_addcol4(a_d, b_d, c_d, d_d, n, strm) &
358 bind(c, name = 'hip_addcol4')
359 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
360 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
361 integer(c_int) :: n
362 end subroutine hip_addcol4
363
364 subroutine hip_addcol3s2(a_d, b_d, c_d, s, n, strm) &
365 bind(c, name = 'hip_addcol3s2')
366 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
367 import c_rp
368 type(c_ptr), value :: a_d, b_d, c_d, strm
369 real(c_rp) :: s
370 integer(c_int) :: n
371 end subroutine hip_addcol3s2
372
373 subroutine hip_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm) &
374 bind(c, name = 'hip_vdot3')
375 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
376 type(c_ptr), value :: dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, strm
377 integer(c_int) :: n
378 end subroutine hip_vdot3
379
380 subroutine hip_vcross(u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, &
381 w1_d, w2_d, w3_d, n, strm) &
382 bind(c, name = 'hip_vcross')
383 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
384
385 type(c_ptr), value :: u1_d, u2_d, u3_d
386 type(c_ptr), value :: v1_d, v2_d, v3_d
387 type(c_ptr), value :: w1_d, w2_d, w3_d
388 type(c_ptr), value :: strm
389 integer(c_int) :: n
390 end subroutine hip_vcross
391
392 real(c_rp) function hip_vlsc3(u_d, v_d, w_d, n, strm) &
393 bind(c, name = 'hip_vlsc3')
394 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
395 import c_rp
396 type(c_ptr), value :: u_d, v_d, w_d, strm
397 integer(c_int) :: n
398 end function hip_vlsc3
399
400 subroutine hip_add2s2_many(y_d, x_d_d, a_d, j, n, strm) &
401 bind(c, name = 'hip_add2s2_many')
402 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
403 import c_rp
404 type(c_ptr), value :: y_d, x_d_d, a_d, strm
405 integer(c_int) :: j, n
406 end subroutine hip_add2s2_many
407
408 real(c_xp) function hip_glsc3(a_d, b_d, c_d, n, strm) &
409 bind(c, name = 'hip_glsc3')
410 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
411 import c_xp
412 type(c_ptr), value :: a_d, b_d, c_d, strm
413 integer(c_int) :: n
414 end function hip_glsc3
415
416 subroutine hip_glsc3_many(h, w_d, v_d_d, mult_d, j, n, strm) &
417 bind(c, name = 'hip_glsc3_many')
418 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
419 import c_xp
420 type(c_ptr), value :: w_d, v_d_d, mult_d, strm
421 integer(c_int) :: j, n
422 real(c_xp) :: h(j)
423 end subroutine hip_glsc3_many
424
425 real(c_xp) function hip_glsc2(a_d, b_d, n, strm) &
426 bind(c, name = 'hip_glsc2')
427 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
428 import c_xp
429 type(c_ptr), value :: a_d, b_d, strm
430 integer(c_int) :: n
431 end function hip_glsc2
432
433 real(c_xp) function hip_glsubnorm2(a_d, b_d, n, strm) &
434 bind(c, name = 'hip_glsubnorm2')
435 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
436 import c_xp
437 type(c_ptr), value :: a_d, b_d, strm
438 integer(c_int) :: n
439 end function hip_glsubnorm2
440
441 real(c_xp) function hip_glsum(a_d, n, strm) &
442 bind(c, name = 'hip_glsum')
443 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
444 import c_xp
445 type(c_ptr), value :: a_d, strm
446 integer(c_int) :: n
447 end function hip_glsum
448
449 real(c_rp) function hip_glmax(a_d, ninf, n, strm) &
450 bind(c, name = 'hip_glmax')
451 use, intrinsic :: iso_c_binding, only: c_int, c_ptr
452 import c_rp
453 type(c_ptr), value :: a_d, strm
454 real(c_rp) :: ninf
455 integer(c_int) :: n
456 end function hip_glmax
457
458 real(c_rp) function hip_glmin(a_d, pinf, n, strm) &
459 bind(c, name = 'hip_glmin')
460 use, intrinsic :: iso_c_binding, only: c_int, c_ptr
461 import c_rp
462 type(c_ptr), value :: a_d, strm
463 real(c_rp) :: pinf
464 integer(c_int) :: n
465 end function hip_glmin
466
467 subroutine hip_absval(a_d, n, strm) &
468 bind(c, name = 'hip_absval')
469 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
470 import c_rp
471 type(c_ptr), value :: a_d, strm
472 integer(c_int) :: n
473 end subroutine hip_absval
474 end interface
475
476 ! ========================================================================== !
477 ! Interfaces for the pointwise operations.
478
479 interface
480 subroutine hip_pwmax_vec2(a_d, b_d, n, strm) &
481 bind(c, name = 'hip_pwmax_vec2')
482 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
483 type(c_ptr), value :: a_d, b_d, strm
484 integer(c_int) :: n
485 end subroutine hip_pwmax_vec2
486
487 subroutine hip_pwmax_vec3(a_d, b_d, c_d, n, strm) &
488 bind(c, name = 'hip_pwmax_vec3')
489 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
490 type(c_ptr), value :: a_d, b_d, c_d, strm
491 integer(c_int) :: n
492 end subroutine hip_pwmax_vec3
493
494 subroutine hip_pwmax_sca2(a_d, c_d, n, strm) &
495 bind(c, name = 'hip_pwmax_sca2')
496 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
497 import c_rp
498 type(c_ptr), value :: a_d, strm
499 real(c_rp) :: c_d
500 integer(c_int) :: n
501 end subroutine hip_pwmax_sca2
502
503 subroutine hip_pwmax_sca3(a_d, b_d, c_d, n, strm) &
504 bind(c, name = 'hip_pwmax_sca3')
505 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
506 import c_rp
507 type(c_ptr), value :: a_d, b_d, strm
508 real(c_rp) :: c_d
509 integer(c_int) :: n
510 end subroutine hip_pwmax_sca3
511
512 subroutine hip_pwmin_vec2(a_d, b_d, n, strm) &
513 bind(c, name = 'hip_pwmin_vec2')
514 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
515 type(c_ptr), value :: a_d, b_d, strm
516 integer(c_int) :: n
517 end subroutine hip_pwmin_vec2
518
519 subroutine hip_pwmin_vec3(a_d, b_d, c_d, n, strm) &
520 bind(c, name = 'hip_pwmin_vec3')
521 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
522 type(c_ptr), value :: a_d, b_d, c_d, strm
523 integer(c_int) :: n
524 end subroutine hip_pwmin_vec3
525
526 subroutine hip_pwmin_sca2(a_d, c_d, n, strm) &
527 bind(c, name = 'hip_pwmin_sca2')
528 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
529 import c_rp
530 type(c_ptr), value :: a_d, strm
531 real(c_rp) :: c_d
532 integer(c_int) :: n
533 end subroutine hip_pwmin_sca2
534
535 subroutine hip_pwmin_sca3(a_d, b_d, c_d, n, strm) &
536 bind(c, name = 'hip_pwmin_sca3')
537 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
538 import c_rp
539 type(c_ptr), value :: a_d, b_d, strm
540 real(c_rp) :: c_d
541 integer(c_int) :: n
542 end subroutine hip_pwmin_sca3
543
544 end interface
545
546 ! ========================================================================== !
547 ! Interfaces for integer operations.
548
549 interface
550
551 subroutine hip_iadd(a_d, c, n, strm) &
552 bind(c, name = 'hip_iadd')
553 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
554 import c_rp
555 type(c_ptr), value :: a_d, strm
556 integer(c_int) :: c
557 integer(c_int) :: n
558 end subroutine hip_iadd
559
560 end interface
561end module hip_math
integer, parameter, public c_xp
Definition num_types.f90:15
integer, parameter, public c_rp
Definition num_types.f90:13
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12