Neko 1.99.6
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
opencl_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 opencl_copy(a_d, b_d, n, strm) &
40 bind(c, name = 'opencl_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 opencl_copy
45
46 subroutine opencl_masked_copy_0(a_d, b_d, mask_d, n, n_mask, strm) &
47 bind(c, name = 'opencl_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 opencl_masked_copy_0
52
53 subroutine opencl_masked_copy_aligned(a_d, b_d, mask_d, n, n_mask, strm) &
54 bind(c, name = 'opencl_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 opencl_masked_copy_aligned
59
60 subroutine opencl_masked_gather_copy(a_d, b_d, mask_d, n, n_mask, strm) &
61 bind(c, name = 'opencl_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 opencl_masked_gather_copy
66
67 subroutine opencl_masked_gather_copy_aligned(a_d, b_d, mask_d, n, n_mask, &
68 strm) bind(c, name = 'opencl_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 opencl_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 = 'opencl_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
81
82 subroutine opencl_masked_scatter_copy(a_d, b_d, mask_d, n, n_mask, strm) &
83 bind(c, name = 'opencl_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 opencl_masked_scatter_copy
88
89 subroutine opencl_masked_scatter_copy_aligned(a_d, b_d, mask_d, n, &
90 n_mask, strm) &
91 bind(c, name = 'opencl_masked_scatter_copy_aligned')
92 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
93 type(c_ptr), value :: a_d, b_d, mask_d, strm
94 integer(c_int) :: n, n_mask
96
97 subroutine opencl_cfill_mask(a_d, c, n, mask_d, n_mask, strm) &
98 bind(c, name = 'opencl_cfill_mask')
99 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
100 import c_rp
101 type(c_ptr), value :: a_d
102 real(c_rp) :: c
103 integer(c_int) :: n
104 type(c_ptr), value :: mask_d
105 integer(c_int) :: n_mask
106 type(c_ptr), value :: strm
107 end subroutine opencl_cfill_mask
108
109 subroutine opencl_cmult(a_d, c, n, strm) &
110 bind(c, name = 'opencl_cmult')
111 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
112 import c_rp
113 type(c_ptr), value :: a_d, strm
114 real(c_rp) :: c
115 integer(c_int) :: n
116 end subroutine opencl_cmult
117
118 subroutine opencl_cmult2(a_d, b_d, c, n, strm) &
119 bind(c, name = 'opencl_cmult2')
120 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
121 import c_rp
122 type(c_ptr), value :: a_d, b_d, strm
123 real(c_rp) :: c
124 integer(c_int) :: n
125 end subroutine opencl_cmult2
126
127 subroutine opencl_cdiv(a_d, c, n, strm) &
128 bind(c, name = 'opencl_cdiv')
129 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
130 import c_rp
131 type(c_ptr), value :: a_d, strm
132 real(c_rp) :: c
133 integer(c_int) :: n
134 end subroutine opencl_cdiv
135
136 subroutine opencl_cdiv2(a_d, b_d, c, n, strm) &
137 bind(c, name = 'opencl_cdiv2')
138 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
139 import c_rp
140 type(c_ptr), value :: a_d, b_d, strm
141 real(c_rp) :: c
142 integer(c_int) :: n
143 end subroutine opencl_cdiv2
144
145 subroutine opencl_radd(a_d, c, n, strm) &
146 bind(c, name = 'opencl_radd')
147 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
148 import c_rp
149 type(c_ptr), value :: a_d, strm
150 real(c_rp) :: c
151 integer(c_int) :: n
152 end subroutine opencl_radd
153
154 subroutine opencl_iadd(a_d, c, n, strm) &
155 bind(c, name = 'opencl_iadd')
156 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
157 import c_rp
158 type(c_ptr), value :: a_d, strm
159 integer(c_int) :: c
160 integer(c_int) :: n
161 end subroutine opencl_iadd
162
163 subroutine opencl_cadd2(a_d, b_d, c, n, strm) &
164 bind(c, name = 'opencl_cadd2')
165 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
166 import c_rp
167 type(c_ptr), value :: a_d
168 type(c_ptr), value :: b_d
169 type(c_ptr), value :: strm
170 real(c_rp) :: c
171 integer(c_int) :: n
172 end subroutine opencl_cadd2
173
174 subroutine opencl_cwrap(a_d, min_val, max_val, n, strm) &
175 bind(c, name = 'opencl_cwrap')
176 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
177 import c_rp
178 type(c_ptr), value :: a_d
179 type(c_ptr), value :: strm
180 real(c_rp) :: min_val
181 real(c_rp) :: max_val
182 integer(c_int) :: n
183 end subroutine opencl_cwrap
184
185 subroutine opencl_sqrt_inplace(a_d, n, strm) &
186 bind(c, name = 'opencl_sqrt_inplace')
187 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
188 type(c_ptr), value :: a_d
189 type(c_ptr), value :: strm
190 integer(c_int) :: n
191 end subroutine opencl_sqrt_inplace
192
193 subroutine opencl_power(ap_d, a_d, p, n, strm) &
194 bind(c, name = 'opencl_power')
195 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
196 import c_rp
197 type(c_ptr), value :: ap_d
198 type(c_ptr), value :: a_d
199 type(c_ptr), value :: strm
200 real(c_rp) :: p
201 integer(c_int) :: n
202 end subroutine opencl_power
203
204 subroutine opencl_cfill(a_d, c, n, strm) &
205 bind(c, name = 'opencl_cfill')
206 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
207 import c_rp
208 type(c_ptr), value :: a_d
209 type(c_ptr), value :: strm
210 real(c_rp) :: c
211 integer(c_int) :: n
212 end subroutine opencl_cfill
213
214 subroutine opencl_rzero(a_d, n, strm) &
215 bind(c, name = 'opencl_rzero')
216 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
217 type(c_ptr), value :: a_d, strm
218 integer(c_int) :: n
219 end subroutine opencl_rzero
220
221 subroutine opencl_rone(a_d, n, strm) &
222 bind(c, name = 'opencl_rone')
223 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
224 type(c_ptr), value :: a_d, strm
225 integer(c_int) :: n
226 end subroutine opencl_rone
227
228 subroutine opencl_add2(a_d, b_d, n, strm) &
229 bind(c, name = 'opencl_add2')
230 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
231 implicit none
232 type(c_ptr), value :: a_d, b_d, strm
233 integer(c_int) :: n
234 end subroutine opencl_add2
235
236 subroutine opencl_add4(a_d, b_d, c_d, d_d, n, strm) &
237 bind(c, name = 'opencl_add4')
238 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
239 implicit none
240 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
241 integer(c_int) :: n
242 end subroutine opencl_add4
243
244 subroutine opencl_add2s1(a_d, b_d, c1, n, strm) &
245 bind(c, name = 'opencl_add2s1')
246 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
247 import c_rp
248 implicit none
249 type(c_ptr), value :: a_d, b_d, strm
250 real(c_rp) :: c1
251 integer(c_int) :: n
252 end subroutine opencl_add2s1
253
254 subroutine opencl_add2s2(a_d, b_d, c1, n, strm) &
255 bind(c, name = 'opencl_add2s2')
256 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
257 import c_rp
258 implicit none
259 type(c_ptr), value :: a_d, b_d, strm
260 real(c_rp) :: c1
261 integer(c_int) :: n
262 end subroutine opencl_add2s2
263
264 subroutine opencl_add2s2_many(y_d, x_d_d, a_d, j, n, strm) &
265 bind(c, name = 'opencl_add2s2_many')
266 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
267 import c_rp
268 implicit none
269 type(c_ptr), value :: y_d, x_d_d, a_d, strm
270 integer(c_int) :: j, n
271 end subroutine opencl_add2s2_many
272
273 subroutine opencl_addsqr2s2(a_d, b_d, c1, n, strm) &
274 bind(c, name = 'opencl_addsqr2s2')
275 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
276 import c_rp
277 implicit none
278 type(c_ptr), value :: a_d, b_d, strm
279 real(c_rp) :: c1
280 integer(c_int) :: n
281 end subroutine opencl_addsqr2s2
282
283 subroutine opencl_add3s2(a_d, b_d, c_d, c1, c2, n, strm) &
284 bind(c, name = 'opencl_add3s2')
285 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
286 import c_rp
287 implicit none
288 type(c_ptr), value :: a_d, b_d, c_d, strm
289 real(c_rp) :: c1, c2
290 integer(c_int) :: n
291 end subroutine opencl_add3s2
292
293 subroutine opencl_add4s3(a_d, b_d, c_d, d_d, c1, c2, c3, n, strm) &
294 bind(c, name = 'opencl_add4s3')
295 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
296 import c_rp
297 implicit none
298 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
299 real(c_rp) :: c1, c2, c3
300 integer(c_int) :: n
301 end subroutine opencl_add4s3
302
303 subroutine opencl_add5s4(a_d, b_d, c_d, d_d, e_d, &
304 c1, c2, c3, c4, n, strm) &
305 bind(c, name = 'opencl_add5s4')
306 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
307 import c_rp
308 implicit none
309 type(c_ptr), value :: a_d, b_d, c_d, d_d, e_d, strm
310 real(c_rp) :: c1, c2, c3, c4
311 integer(c_int) :: n
312 end subroutine opencl_add5s4
313
314 subroutine opencl_invcol1(a_d, n, strm) &
315 bind(c, name = 'opencl_invcol1')
316 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
317 implicit none
318 type(c_ptr), value :: a_d, strm
319 integer(c_int) :: n
320 end subroutine opencl_invcol1
321
322 subroutine opencl_invcol2(a_d, b_d, n, strm) &
323 bind(c, name = 'opencl_invcol2')
324 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
325 implicit none
326 type(c_ptr), value :: a_d, b_d, strm
327 integer(c_int) :: n
328 end subroutine opencl_invcol2
329
330 subroutine opencl_invcol3(a_d, b_d, c_d, n, strm) &
331 bind(c, name = 'opencl_invcol3')
332 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
333 implicit none
334 type(c_ptr), value :: a_d, b_d, c_d, strm
335 integer(c_int) :: n
336 end subroutine opencl_invcol3
337
338 subroutine opencl_col2(a_d, b_d, n, strm) &
339 bind(c, name = 'opencl_col2')
340 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
341 implicit none
342 type(c_ptr), value :: a_d, b_d, strm
343 integer(c_int) :: n
344 end subroutine opencl_col2
345
346 subroutine opencl_col3(a_d, b_d, c_d, n, strm) &
347 bind(c, name = 'opencl_col3')
348 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
349 implicit none
350 type(c_ptr), value :: a_d, b_d, c_d, strm
351 integer(c_int) :: n
352 end subroutine opencl_col3
353
354 subroutine opencl_subcol3(a_d, b_d, c_d, n, strm) &
355 bind(c, name = 'opencl_subcol3')
356 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
357 implicit none
358 type(c_ptr), value :: a_d, b_d, c_d, strm
359 integer(c_int) :: n
360 end subroutine opencl_subcol3
361
362 subroutine opencl_sub2(a_d, b_d, n, strm) &
363 bind(c, name = 'opencl_sub2')
364 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
365 implicit none
366 type(c_ptr), value :: a_d, b_d, strm
367 integer(c_int) :: n
368 end subroutine opencl_sub2
369
370 subroutine opencl_sub3(a_d, b_d, c_d, n, strm) &
371 bind(c, name = 'opencl_sub3')
372 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
373 implicit none
374 type(c_ptr), value :: a_d, b_d, c_d, strm
375 integer(c_int) :: n
376 end subroutine opencl_sub3
377
378 subroutine opencl_add3(a_d, b_d, c_d, n, strm) &
379 bind(c, name = 'opencl_add3')
380 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
381 implicit none
382 type(c_ptr), value :: a_d, b_d, c_d, strm
383 integer(c_int) :: n
384 end subroutine opencl_add3
385
386 subroutine opencl_addcol3(a_d, b_d, c_d, n, strm) &
387 bind(c, name = 'opencl_addcol3')
388 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
389 implicit none
390 type(c_ptr), value :: a_d, b_d, c_d, strm
391 integer(c_int) :: n
392 end subroutine opencl_addcol3
393
394 subroutine opencl_addcol4(a_d, b_d, c_d, d_d, n, strm) &
395 bind(c, name = 'opencl_addcol4')
396 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
397 implicit none
398 type(c_ptr), value :: a_d, b_d, c_d, d_d, strm
399 integer(c_int) :: n
400 end subroutine opencl_addcol4
401
402 subroutine opencl_addcol3s2(a_d, b_d, c_d, s, n, strm) &
403 bind(c, name = 'opencl_addcol3s2')
404 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
405 import c_rp
406 type(c_ptr), value :: a_d, b_d, c_d, strm
407 real(c_rp) :: s
408 integer(c_int) :: n
409 end subroutine opencl_addcol3s2
410
411 subroutine opencl_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, &
412 n, strm) &
413 bind(c, name = 'opencl_vdot3')
414 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
415 implicit none
416 type(c_ptr), value :: dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d
417 type(c_ptr), value :: strm
418 integer(c_int) :: n
419 end subroutine opencl_vdot3
420
421 subroutine opencl_vcross(u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, &
422 w1_d, w2_d, w3_d, n, strm) &
423 bind(c, name = 'opencl_vcross')
424 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
425 type(c_ptr), value :: u1_d, u2_d, u3_d
426 type(c_ptr), value :: v1_d, v2_d, v3_d
427 type(c_ptr), value :: w1_d, w2_d, w3_d
428 type(c_ptr), value :: strm
429 integer(c_int) :: n
430 end subroutine opencl_vcross
431
432 real(c_xp) function opencl_glsc3(a_d, b_d, c_d, n, strm) &
433 bind(c, name = 'opencl_glsc3')
434 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
435 import c_xp
436 implicit none
437 type(c_ptr), value :: a_d, b_d, c_d, strm
438 integer(c_int) :: n
439 end function opencl_glsc3
440
441 subroutine opencl_glsc3_many(h, w_d, v_d_d, mult_d, j, n, strm) &
442 bind(c, name = 'opencl_glsc3_many')
443 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
444 import c_xp
445 implicit none
446 integer(c_int) :: j, n
447 type(c_ptr), value :: w_d, v_d_d, mult_d, strm
448 real(c_xp) :: h(j)
449 end subroutine opencl_glsc3_many
450
451 real(c_xp) function opencl_glsc2(a_d, b_d, n, strm) &
452 bind(c, name = 'opencl_glsc2')
453 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
454 import c_xp
455 implicit none
456 type(c_ptr), value :: a_d, b_d, strm
457 integer(c_int) :: n
458 end function opencl_glsc2
459
460 real(c_xp) function opencl_glsubnorm2(a_d, b_d, n, strm) &
461 bind(c, name = 'opencl_glsubnorm2')
462 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
463 import c_xp
464 implicit none
465 type(c_ptr), value :: a_d, b_d, strm
466 integer(c_int) :: n
467 end function opencl_glsubnorm2
468
469 real(c_xp) function opencl_glsum(a_d, n, strm) &
470 bind(c, name = 'opencl_glsum')
471 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
472 import c_xp
473 implicit none
474 type(c_ptr), value :: a_d, strm
475 integer(c_int) :: n
476 end function opencl_glsum
477
478 real(c_rp) function opencl_glmax(a_d, n, strm) &
479 bind(c, name = 'opencl_glmax')
480 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
481 import c_rp
482 implicit none
483 type(c_ptr), value :: a_d, strm
484 integer(c_int) :: n
485 end function opencl_glmax
486
487 real(c_rp) function opencl_glmin(a_d, n, strm) &
488 bind(c, name = 'opencl_glmin')
489 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
490 import c_rp
491 implicit none
492 type(c_ptr), value :: a_d, strm
493 integer(c_int) :: n
494 end function opencl_glmin
495
496 subroutine opencl_absval(a_d, n, strm) &
497 bind(c, name = 'opencl_absval')
498 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
499 implicit none
500 type(c_ptr), value :: a_d, strm
501 integer(c_int) :: n
502 end subroutine opencl_absval
503 end interface
504
505 ! ========================================================================== !
506 ! Interfaces for the pointwise operations.
507
508 interface
509 subroutine opencl_pwmax_vec2(a_d, b_d, n, strm) &
510 bind(c, name = 'opencl_pwmax_vec2')
511 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
512 type(c_ptr), value :: a_d, b_d, strm
513 integer(c_int) :: n
514 end subroutine opencl_pwmax_vec2
515
516 subroutine opencl_pwmax_vec3(a_d, b_d, c_d, n, strm) &
517 bind(c, name = 'opencl_pwmax_vec3')
518 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
519 type(c_ptr), value :: a_d, b_d, c_d, strm
520 integer(c_int) :: n
521 end subroutine opencl_pwmax_vec3
522
523 subroutine opencl_pwmax_sca2(a_d, c_d, n, strm) &
524 bind(c, name = 'opencl_pwmax_sca2')
525 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
526 import c_rp
527 type(c_ptr), value :: a_d, strm
528 real(c_rp) :: c_d
529 integer(c_int) :: n
530 end subroutine opencl_pwmax_sca2
531
532 subroutine opencl_pwmax_sca3(a_d, b_d, c_d, n, strm) &
533 bind(c, name = 'opencl_pwmax_sca3')
534 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
535 import c_rp
536 type(c_ptr), value :: a_d, b_d, strm
537 real(c_rp) :: c_d
538 integer(c_int) :: n
539 end subroutine opencl_pwmax_sca3
540
541 subroutine opencl_pwmin_vec2(a_d, b_d, n, strm) &
542 bind(c, name = 'opencl_pwmin_vec2')
543 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
544 type(c_ptr), value :: a_d, b_d, strm
545 integer(c_int) :: n
546 end subroutine opencl_pwmin_vec2
547
548 subroutine opencl_pwmin_vec3(a_d, b_d, c_d, n, strm) &
549 bind(c, name = 'opencl_pwmin_vec3')
550 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
551 type(c_ptr), value :: a_d, b_d, c_d, strm
552 integer(c_int) :: n
553 end subroutine opencl_pwmin_vec3
554
555 subroutine opencl_pwmin_sca2(a_d, c_d, n, strm) &
556 bind(c, name = 'opencl_pwmin_sca2')
557 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
558 import c_rp
559 type(c_ptr), value :: a_d, strm
560 real(c_rp) :: c_d
561 integer(c_int) :: n
562 end subroutine opencl_pwmin_sca2
563
564 subroutine opencl_pwmin_sca3(a_d, b_d, c_d, n, strm) &
565 bind(c, name = 'opencl_pwmin_sca3')
566 use, intrinsic :: iso_c_binding, only : c_int, c_ptr
567 import c_rp
568 type(c_ptr), value :: a_d, b_d, strm
569 real(c_rp) :: c_d
570 integer(c_int) :: n
571 end subroutine opencl_pwmin_sca3
572
573 end interface
574
575end module opencl_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