36 use utils,
only: neko_error
37 use num_types,
only: rp, c_rp
38 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
45 bind(c, name =
'hip_copy_mask')
46 import c_rp, c_int, c_ptr
47 type(c_ptr),
value :: a_d
48 type(c_ptr),
value :: b_d
49 integer(c_int) :: size
50 type(c_ptr),
value :: mask_d
51 integer(c_int) :: mask_size
56 bind(c, name =
'hip_cadd_mask')
57 import c_rp, c_int, c_ptr
58 type(c_ptr),
value :: a_d
60 integer(c_int) :: size
61 type(c_ptr),
value :: mask_d
62 integer(c_int) :: mask_size
67 bind(c, name =
'hip_invcol1_mask')
68 import c_rp, c_int, c_ptr
69 type(c_ptr),
value :: a_d
70 integer(c_int) :: size
71 type(c_ptr),
value :: mask_d
72 integer(c_int) :: mask_size
77 bind(c, name =
'hip_col2_mask')
78 import c_rp, c_int, c_ptr
79 type(c_ptr),
value :: a_d
80 type(c_ptr),
value :: b_d
81 integer(c_int) :: size
82 type(c_ptr),
value :: mask_d
83 integer(c_int) :: mask_size
88 bind(c, name =
'hip_col3_mask')
89 import c_rp, c_int, c_ptr
90 type(c_ptr),
value :: a_d
91 type(c_ptr),
value :: b_d
92 type(c_ptr),
value :: c_d
93 integer(c_int) :: size
94 type(c_ptr),
value :: mask_d
95 integer(c_int) :: mask_size
100 bind(c, name =
'hip_sub3_mask')
101 import c_rp, c_int, c_ptr
102 type(c_ptr),
value :: a_d
103 type(c_ptr),
value :: b_d
104 type(c_ptr),
value :: c_d
105 integer(c_int) :: size
106 type(c_ptr),
value :: mask_d
107 integer(c_int) :: mask_size
115 bind(c, name =
'cuda_copy_mask')
116 import c_rp, c_int, c_ptr
117 type(c_ptr),
value :: a_d
118 type(c_ptr),
value :: b_d
119 integer(c_int) :: size
120 type(c_ptr),
value :: mask_d
121 integer(c_int) :: mask_size
126 bind(c, name =
'cuda_cadd_mask')
127 import c_rp, c_int, c_ptr
128 type(c_ptr),
value :: a_d
130 integer(c_int) :: size
131 type(c_ptr),
value :: mask_d
132 integer(c_int) :: mask_size
137 bind(c, name =
'cuda_invcol1_mask')
138 import c_rp, c_int, c_ptr
139 type(c_ptr),
value :: a_d
140 integer(c_int) :: size
141 type(c_ptr),
value :: mask_d
142 integer(c_int) :: mask_size
147 bind(c, name =
'cuda_col2_mask')
148 import c_rp, c_int, c_ptr
149 type(c_ptr),
value :: a_d
150 type(c_ptr),
value :: b_d
151 integer(c_int) :: size
152 type(c_ptr),
value :: mask_d
153 integer(c_int) :: mask_size
158 bind(c, name =
'cuda_col3_mask')
159 import c_rp, c_int, c_ptr
160 type(c_ptr),
value :: a_d
161 type(c_ptr),
value :: b_d
162 type(c_ptr),
value :: c_d
163 integer(c_int) :: size
164 type(c_ptr),
value :: mask_d
165 integer(c_int) :: mask_size
170 bind(c, name =
'cuda_sub3_mask')
171 import c_rp, c_int, c_ptr
172 type(c_ptr),
value :: a_d
173 type(c_ptr),
value :: b_d
174 type(c_ptr),
value :: c_d
175 integer(c_int) :: size
176 type(c_ptr),
value :: mask_d
177 integer(c_int) :: mask_size
187 subroutine device_copy_mask(a_d, b_d, size, mask_d, mask_size)
191 type(c_ptr) :: mask_d
198 call neko_error(
'No device backend configured for device_copy_mask')
200 end subroutine device_copy_mask
202 subroutine device_cadd_mask(a_d, c, size, mask_d, mask_size)
204 real(kind=rp),
intent(in) :: c
206 type(c_ptr) :: mask_d
213 call neko_error(
'No device backend configured for device_cadd_mask')
215 end subroutine device_cadd_mask
217 subroutine device_invcol1_mask(a_d, size, mask_d, mask_size)
220 type(c_ptr) :: mask_d
227 call neko_error(
'No device backend configured for device_invcol1_mask')
229 end subroutine device_invcol1_mask
231 subroutine device_col2_mask(a_d, b_d, size, mask_d, mask_size)
235 type(c_ptr) :: mask_d
242 call neko_error(
'No device backend configured for device_col2_mask')
244 end subroutine device_col2_mask
246 subroutine device_col3_mask(a_d, b_d, c_d, size, mask_d, mask_size)
251 type(c_ptr) :: mask_d
258 call neko_error(
'No device backend configured for device_col3_mask')
260 end subroutine device_col3_mask
262 subroutine device_sub3_mask(a_d, b_d, c_d, size, mask_d, mask_size)
267 type(c_ptr) :: mask_d
274 call neko_error(
'No device backend configured for device_sub3_mask')
276 end subroutine device_sub3_mask
278end module device_math_ext