Neko 1.99.3
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
cuda_math.f90
Go to the documentation of this file.
1! Copyright (c) 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 cuda_copy(a_d, b_d, n, strm) &
40 bind(c, name = 'cuda_copy')
41 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
42 type(c_ptr), value :: a_d, b_d, strm
43 integer(c_int) :: n
44 end subroutine cuda_copy
45
46 subroutine cuda_masked_copy(a_d, b_d, mask_d, n, n_mask, strm) &
47 bind(c, name = 'cuda_masked_copy')
48 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
49 type(c_ptr), value :: a_d, b_d, mask_d, strm
50 integer(c_int) :: n, n_mask
51 end subroutine cuda_masked_copy
52
53 subroutine cuda_masked_gather_copy(a_d, b_d, mask_d, n, n_mask, strm) &
54 bind(c, name = 'cuda_masked_gather_copy')
55 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
56 type(c_ptr), value :: a_d, b_d, mask_d, strm
57 integer(c_int) :: n, n_mask
58 end subroutine cuda_masked_gather_copy
59
60 subroutine cuda_masked_gather_copy_aligned(a_d, b_d, mask_d, n, n_mask, &
61 strm) bind(c, name = 'cuda_masked_gather_copy_aligned')
62 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
63 type(c_ptr), value :: a_d, b_d, mask_d, strm
64 integer(c_int) :: n, n_mask
66
67 subroutine cuda_face_masked_gather_copy(a_d, b_d, mask_d, facet_d, n1, &
68 n2, lx, ly, lz, n_mask, strm) &
69 bind(c, name = 'cuda_face_masked_gather_copy')
70 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
71 type(c_ptr), value :: a_d, b_d, mask_d, facet_d, strm
72 integer(c_int) :: n1, n2, lx, ly, lz, n_mask
73 end subroutine cuda_face_masked_gather_copy
74
75 subroutine cuda_masked_scatter_copy(a_d, b_d, mask_d, n, n_mask, strm) &
76 bind(c, name = 'cuda_masked_scatter_copy')
77 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
78 type(c_ptr), value :: a_d, b_d, mask_d, strm
79 integer(c_int) :: n, n_mask
80 end subroutine cuda_masked_scatter_copy
81
82 subroutine cuda_masked_scatter_copy_aligned(a_d, b_d, mask_d, n, n_mask, strm) &
83 bind(c, name = 'cuda_masked_scatter_copy_aligned')
84 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
85 type(c_ptr), value :: a_d, b_d, mask_d, strm
86 integer(c_int) :: n, n_mask
88
89 subroutine cuda_masked_atomic_reduction(a_d, b_d, mask_d, n, m, strm) &
90 bind(c, name = 'cuda_masked_atomic_reduction')
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, m
94 end subroutine cuda_masked_atomic_reduction
95
96 subroutine cuda_cfill_mask(a_d, c, n, mask_d, n_mask, strm) &
97 bind(c, name = 'cuda_cfill_mask')
98 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
99 import c_rp
100 type(c_ptr), value :: a_d, strm
101 real(c_rp) :: c
102 integer(c_int) :: n
103 type(c_ptr), value :: mask_d
104 integer(c_int) :: n_mask
105 end subroutine cuda_cfill_mask
106
107 subroutine cuda_cmult(a_d, c, n, strm) &
108 bind(c, name = 'cuda_cmult')
109 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
110 import c_rp
111 type(c_ptr), value :: a_d, strm
112 real(c_rp) :: c
113 integer(c_int) :: n
114 end subroutine cuda_cmult
115
116 subroutine cuda_cmult2(a_d, b_d, c, n, strm) &
117 bind(c, name = 'cuda_cmult2')
118 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
119 import c_rp
120 type(c_ptr), value :: a_d, b_d, strm
121 real(c_rp) :: c
122 integer(c_int) :: n
123 end subroutine cuda_cmult2
124
125 subroutine cuda_cdiv(a_d, c, n, strm) &
126 bind(c, name = 'cuda_cdiv')
127 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
128 import c_rp
129 type(c_ptr), value :: a_d, strm
130 real(c_rp) :: c
131 integer(c_int) :: n
132 end subroutine cuda_cdiv
133
134 subroutine cuda_cdiv2(a_d, b_d, c, n, strm) &
135 bind(c, name = 'cuda_cdiv2')
136 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
137 import c_rp
138 type(c_ptr), value :: a_d, b_d, strm
139 real(c_rp) :: c
140 integer(c_int) :: n
141 end subroutine cuda_cdiv2
142
143 subroutine cuda_radd(a_d, c, n, strm) &
144 bind(c, name = 'cuda_radd')
145 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
146 import c_rp
147 type(c_ptr), value :: a_d, strm
148 real(c_rp) :: c
149 integer(c_int) :: n
150 end subroutine cuda_radd
151
152 subroutine cuda_cadd2(a_d, b_d, c, n, strm) &
153 bind(c, name = 'cuda_cadd2')
154 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
155 import c_rp
156 type(c_ptr), value :: a_d
157 type(c_ptr), value :: b_d
158 type(c_ptr), value :: strm
159 real(c_rp) :: c
160 integer(c_int) :: n
161 end subroutine cuda_cadd2
162
163 subroutine cuda_cwrap(a_d, min_val, max_val, n, strm) &
164 bind(c, name = 'cuda_cwrap')
165 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
166 import c_rp
167 type(c_ptr), value :: a_d
168 type(c_ptr), value :: strm
169 real(c_rp) :: min_val
170 real(c_rp) :: max_val
171 integer(c_int) :: n
172 end subroutine cuda_cwrap
173
174 subroutine cuda_cfill(a_d, c, n, strm) &
175 bind(c, name = 'cuda_cfill')
176 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
177 import c_rp
178 type(c_ptr), value :: a_d, strm
179 real(c_rp) :: c
180 integer(c_int) :: n
181 end subroutine cuda_cfill
182
183 subroutine cuda_rzero(a_d, n, strm) &
184 bind(c, name = 'cuda_rzero')
185 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
186 type(c_ptr), value :: a_d, strm
187 integer(c_int) :: n
188 end subroutine cuda_rzero
189
190 subroutine cuda_add2(a_d, b_d, n, strm) &
191 bind(c, name = 'cuda_add2')
192 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
193 import c_rp
194 type(c_ptr), value :: a_d, b_d, strm
195 integer(c_int) :: n
196 end subroutine cuda_add2
197
198 subroutine cuda_add4(a_d, b_d, c_d, d_d, n, strm) &
199 bind(c, name = 'cuda_add4')
200 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
201 import c_rp
202 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
203 integer(c_int) :: n
204 end subroutine cuda_add4
205
206 subroutine cuda_add2s1(a_d, b_d, c1, n, strm) &
207 bind(c, name = 'cuda_add2s1')
208 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
209 import c_rp
210 type(c_ptr), value :: a_d, b_d, strm
211 real(c_rp) :: c1
212 integer(c_int) :: n
213 end subroutine cuda_add2s1
214
215 subroutine cuda_add2s2(a_d, b_d, c1, n, strm) &
216 bind(c, name = 'cuda_add2s2')
217 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
218 import c_rp
219 type(c_ptr), value :: a_d, b_d, strm
220 real(c_rp) :: c1
221 integer(c_int) :: n
222 end subroutine cuda_add2s2
223
224 subroutine cuda_addsqr2s2(a_d, b_d, c1, n, strm) &
225 bind(c, name = 'cuda_addsqr2s2')
226 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
227 import c_rp
228 type(c_ptr), value :: a_d, b_d, strm
229 real(c_rp) :: c1
230 integer(c_int) :: n
231 end subroutine cuda_addsqr2s2
232
233 subroutine cuda_add3s2(a_d, b_d, c_d, c1, c2, n, strm) &
234 bind(c, name = 'cuda_add3s2')
235 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
236 import c_rp
237 type(c_ptr), value :: a_d, b_d, c_d, strm
238 real(c_rp) :: c1, c2
239 integer(c_int) :: n
240 end subroutine cuda_add3s2
241
242 subroutine cuda_add4s3(a_d, b_d, c_d, d_d, c1, c2, c3, n, strm) &
243 bind(c, name = 'cuda_add4s3')
244 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
245 import c_rp
246 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
247 real(c_rp) :: c1, c2, c3
248 integer(c_int) :: n
249 end subroutine cuda_add4s3
250
251 subroutine cuda_add5s4(a_d, b_d, c_d, d_d, e_d, c1, c2, c3, c4, n, strm) &
252 bind(c, name = 'cuda_add5s4')
253 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
254 import c_rp
255 type(c_ptr), value :: a_d, b_d, c_d, d_d, e_d, strm
256 real(c_rp) :: c1, c2, c3, c4
257 integer(c_int) :: n
258 end subroutine cuda_add5s4
259
260 subroutine cuda_invcol1(a_d, n, strm) &
261 bind(c, name = 'cuda_invcol1')
262 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
263 type(c_ptr), value :: a_d, strm
264 integer(c_int) :: n
265 end subroutine cuda_invcol1
266
267 subroutine cuda_invcol2(a_d, b_d, n, strm) &
268 bind(c, name = 'cuda_invcol2')
269 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
270 type(c_ptr), value :: a_d, b_d, strm
271 integer(c_int) :: n
272 end subroutine cuda_invcol2
273
274 subroutine cuda_invcol3(a_d, b_d, c_d, n, strm) &
275 bind(c, name = 'cuda_invcol3')
276 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
277 type(c_ptr), value :: a_d, b_d, c_d, strm
278 integer(c_int) :: n
279 end subroutine cuda_invcol3
280
281 subroutine cuda_col2(a_d, b_d, n, strm) &
282 bind(c, name = 'cuda_col2')
283 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
284 type(c_ptr), value :: a_d, b_d, strm
285 integer(c_int) :: n
286 end subroutine cuda_col2
287
288 subroutine cuda_col3(a_d, b_d, c_d, n, strm) &
289 bind(c, name = 'cuda_col3')
290 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
291 type(c_ptr), value :: a_d, b_d, c_d, strm
292 integer(c_int) :: n
293 end subroutine cuda_col3
294
295 subroutine cuda_subcol3(a_d, b_d, c_d, n, strm) &
296 bind(c, name = 'cuda_subcol3')
297 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
298 type(c_ptr), value :: a_d, b_d, c_d, strm
299 integer(c_int) :: n
300 end subroutine cuda_subcol3
301
302 subroutine cuda_sub2(a_d, b_d, n, strm) &
303 bind(c, name = 'cuda_sub2')
304 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
305 type(c_ptr), value :: a_d, b_d, strm
306 integer(c_int) :: n
307 end subroutine cuda_sub2
308
309 subroutine cuda_sub3(a_d, b_d, c_d, n, strm) &
310 bind(c, name = 'cuda_sub3')
311 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
312 type(c_ptr), value :: a_d, b_d, c_d, strm
313 integer(c_int) :: n
314 end subroutine cuda_sub3
315
316 subroutine cuda_add3(a_d, b_d, c_d, n, strm) &
317 bind(c, name = 'cuda_add3')
318 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
319 type(c_ptr), value :: a_d, b_d, c_d, strm
320 integer(c_int) :: n
321 end subroutine cuda_add3
322
323 subroutine cuda_addcol3(a_d, b_d, c_d, n, strm) &
324 bind(c, name = 'cuda_addcol3')
325 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
326 type(c_ptr), value :: a_d, b_d, c_d, strm
327 integer(c_int) :: n
328 end subroutine cuda_addcol3
329
330 subroutine cuda_addcol4(a_d, b_d, c_d, d_d, n, strm) &
331 bind(c, name = 'cuda_addcol4')
332 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
333 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
334 integer(c_int) :: n
335 end subroutine cuda_addcol4
336
337 subroutine cuda_addcol3s2(a_d, b_d, c_d, s, n, strm) &
338 bind(c, name = 'cuda_addcol3s2')
339 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
340 import c_rp
341 type(c_ptr), value :: a_d, b_d, c_d, strm
342 real(c_rp) :: s
343 integer(c_int) :: n
344 end subroutine cuda_addcol3s2
345
346 subroutine cuda_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm) &
347 bind(c, name = 'cuda_vdot3')
348 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
349 type(c_ptr), value :: dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, strm
350 integer(c_int) :: n
351 end subroutine cuda_vdot3
352
353 subroutine cuda_vcross(u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, &
354 w1_d, w2_d, w3_d, n, strm) &
355 bind(c, name = 'cuda_vcross')
356 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
357 type(c_ptr), value :: u1_d, u2_d, u3_d
358 type(c_ptr), value :: v1_d, v2_d, v3_d
359 type(c_ptr), value :: w1_d, w2_d, w3_d
360 type(c_ptr), value :: strm
361 integer(c_int) :: n
362 end subroutine cuda_vcross
363
364 real(c_rp) function cuda_vlsc3(u_d, v_d, w_d, n, strm) &
365 bind(c, name = 'cuda_vlsc3')
366 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
367 import c_rp
368 type(c_ptr), value :: u_d, v_d, w_d, strm
369 integer(c_int) :: n
370 end function cuda_vlsc3
371
372 subroutine cuda_add2s2_many(y_d, x_d_d, a_d, j, n, strm) &
373 bind(c, name = 'cuda_add2s2_many')
374 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
375 import c_rp
376 type(c_ptr), value :: y_d, x_d_d, a_d, strm
377 integer(c_int) :: j, n
378 end subroutine cuda_add2s2_many
379
380 real(c_rp) function cuda_glsc3(a_d, b_d, c_d, n, strm) &
381 bind(c, name = 'cuda_glsc3')
382 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
383 import c_rp
384 type(c_ptr), value :: a_d, b_d, c_d, strm
385 integer(c_int) :: n
386 end function cuda_glsc3
387
388 subroutine cuda_glsc3_many(h, w_d, v_d_d, mult_d, j, n, strm) &
389 bind(c, name = 'cuda_glsc3_many')
390 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
391 import c_rp
392 type(c_ptr), value :: w_d, v_d_d, mult_d, strm
393 integer(c_int) :: j, n
394 real(c_rp) :: h(j)
395 end subroutine cuda_glsc3_many
396
397 real(c_rp) function cuda_glsc2(a_d, b_d, n, strm) &
398 bind(c, name = 'cuda_glsc2')
399 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
400 import c_rp
401 type(c_ptr), value :: a_d, b_d, strm
402 integer(c_int) :: n
403 end function cuda_glsc2
404
405 real(c_rp) function cuda_glsubnorm2(a_d, b_d, n, strm) &
406 bind(c, name = 'cuda_glsubnorm2')
407 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
408 import c_rp
409 type(c_ptr), value :: a_d, b_d, strm
410 integer(c_int) :: n
411 end function cuda_glsubnorm2
412
413 real(c_rp) function cuda_glsum(a_d, n, strm) &
414 bind(c, name = 'cuda_glsum')
415 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
416 import c_rp
417 type(c_ptr), value :: a_d, strm
418 integer(c_int) :: n
419 end function cuda_glsum
420
421 real(c_rp) function cuda_glmax(a_d, ninf, n, strm) &
422 bind(c, name = 'cuda_glmax')
423 use, intrinsic :: iso_c_binding, only: c_int, c_ptr
424 import c_rp
425 type(c_ptr), value :: a_d, strm
426 real(c_rp) :: ninf
427 integer(c_int) :: n
428 end function cuda_glmax
429
430 real(c_rp) function cuda_glmin(a_d, pinf, n, strm) &
431 bind(c, name = 'cuda_glmin')
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) :: pinf
436 integer(c_int) :: n
437 end function cuda_glmin
438
439 subroutine cuda_absval(a_d, n, strm) &
440 bind(c, name = 'cuda_absval')
441 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
442 import c_rp
443 type(c_ptr), value :: a_d, strm
444 integer(c_int) :: n
445 end subroutine cuda_absval
446 end interface
447
448 ! ========================================================================== !
449 ! Interfaces for the pointwise operations.
450
451 interface
452 subroutine cuda_pwmax_vec2(a_d, b_d, n, strm) &
453 bind(c, name = 'cuda_pwmax_vec2')
454 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
455 type(c_ptr), value :: a_d, b_d, strm
456 integer(c_int) :: n
457 end subroutine cuda_pwmax_vec2
458
459 subroutine cuda_pwmax_vec3(a_d, b_d, c_d, n, strm) &
460 bind(c, name = 'cuda_pwmax_vec3')
461 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
462 type(c_ptr), value :: a_d, b_d, c_d, strm
463 integer(c_int) :: n
464 end subroutine cuda_pwmax_vec3
465
466 subroutine cuda_pwmax_sca2(a_d, c_d, n, strm) &
467 bind(c, name = 'cuda_pwmax_sca2')
468 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
469 import c_rp
470 type(c_ptr), value :: a_d, strm
471 real(c_rp) :: c_d
472 integer(c_int) :: n
473 end subroutine cuda_pwmax_sca2
474
475 subroutine cuda_pwmax_sca3(a_d, b_d, c_d, n, strm) &
476 bind(c, name = 'cuda_pwmax_sca3')
477 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
478 import c_rp
479 type(c_ptr), value :: a_d, b_d, strm
480 real(c_rp) :: c_d
481 integer(c_int) :: n
482 end subroutine cuda_pwmax_sca3
483
484 subroutine cuda_pwmin_vec2(a_d, b_d, n, strm) &
485 bind(c, name = 'cuda_pwmin_vec2')
486 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
487 type(c_ptr), value :: a_d, b_d, strm
488 integer(c_int) :: n
489 end subroutine cuda_pwmin_vec2
490
491 subroutine cuda_pwmin_vec3(a_d, b_d, c_d, n, strm) &
492 bind(c, name = 'cuda_pwmin_vec3')
493 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
494 type(c_ptr), value :: a_d, b_d, c_d, strm
495 integer(c_int) :: n
496 end subroutine cuda_pwmin_vec3
497
498 subroutine cuda_pwmin_sca2(a_d, c_d, n, strm) &
499 bind(c, name = 'cuda_pwmin_sca2')
500 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
501 import c_rp
502 type(c_ptr), value :: a_d, strm
503 real(c_rp) :: c_d
504 integer(c_int) :: n
505 end subroutine cuda_pwmin_sca2
506
507 subroutine cuda_pwmin_sca3(a_d, b_d, c_d, n, strm) &
508 bind(c, name = 'cuda_pwmin_sca3')
509 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
510 import c_rp
511 type(c_ptr), value :: a_d, b_d, strm
512 real(c_rp) :: c_d
513 integer(c_int) :: n
514 end subroutine cuda_pwmin_sca3
515
516 end interface
517
518 ! ========================================================================== !
519 ! Interfaces for integer operations.
520
521 interface
522
523 subroutine cuda_iadd(a_d, c, n, strm) &
524 bind(c, name = 'cuda_iadd')
525 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
526 import c_rp
527 type(c_ptr), value :: a_d, strm
528 integer(c_int) :: c
529 integer(c_int) :: n
530 end subroutine cuda_iadd
531
532 end interface
533end module cuda_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