34 use utils,
only: neko_error
35 use num_types,
only: rp, c_rp
36 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
43 bind(c, name =
'hip_copy_mask')
44 import c_rp, c_int, c_ptr
45 type(c_ptr),
value :: a_d
46 type(c_ptr),
value :: b_d
47 integer(c_int) :: size
48 type(c_ptr),
value :: mask_d
49 integer(c_int) :: mask_size
54 bind(c, name =
'hip_cadd_mask')
55 import c_rp, c_int, c_ptr
56 type(c_ptr),
value :: a_d
58 integer(c_int) :: size
59 type(c_ptr),
value :: mask_d
60 integer(c_int) :: mask_size
65 bind(c, name =
'hip_invcol1_mask')
66 import c_rp, c_int, c_ptr
67 type(c_ptr),
value :: a_d
68 integer(c_int) :: size
69 type(c_ptr),
value :: mask_d
70 integer(c_int) :: mask_size
75 bind(c, name =
'hip_col2_mask')
76 import c_rp, c_int, c_ptr
77 type(c_ptr),
value :: a_d
78 type(c_ptr),
value :: b_d
79 integer(c_int) :: size
80 type(c_ptr),
value :: mask_d
81 integer(c_int) :: mask_size
86 bind(c, name =
'hip_col3_mask')
87 import c_rp, c_int, c_ptr
88 type(c_ptr),
value :: a_d
89 type(c_ptr),
value :: b_d
90 type(c_ptr),
value :: c_d
91 integer(c_int) :: size
92 type(c_ptr),
value :: mask_d
93 integer(c_int) :: mask_size
98 bind(c, name =
'hip_sub3_mask')
99 import c_rp, c_int, c_ptr
100 type(c_ptr),
value :: a_d
101 type(c_ptr),
value :: b_d
102 type(c_ptr),
value :: c_d
103 integer(c_int) :: size
104 type(c_ptr),
value :: mask_d
105 integer(c_int) :: mask_size
113 bind(c, name =
'cuda_copy_mask')
114 import c_rp, c_int, c_ptr
115 type(c_ptr),
value :: a_d
116 type(c_ptr),
value :: b_d
117 integer(c_int) :: size
118 type(c_ptr),
value :: mask_d
119 integer(c_int) :: mask_size
124 bind(c, name =
'cuda_cadd_mask')
125 import c_rp, c_int, c_ptr
126 type(c_ptr),
value :: a_d
128 integer(c_int) :: size
129 type(c_ptr),
value :: mask_d
130 integer(c_int) :: mask_size
135 bind(c, name =
'cuda_invcol1_mask')
136 import c_rp, c_int, c_ptr
137 type(c_ptr),
value :: a_d
138 integer(c_int) :: size
139 type(c_ptr),
value :: mask_d
140 integer(c_int) :: mask_size
145 bind(c, name =
'cuda_col2_mask')
146 import c_rp, c_int, c_ptr
147 type(c_ptr),
value :: a_d
148 type(c_ptr),
value :: b_d
149 integer(c_int) :: size
150 type(c_ptr),
value :: mask_d
151 integer(c_int) :: mask_size
156 bind(c, name =
'cuda_col3_mask')
157 import c_rp, c_int, c_ptr
158 type(c_ptr),
value :: a_d
159 type(c_ptr),
value :: b_d
160 type(c_ptr),
value :: c_d
161 integer(c_int) :: size
162 type(c_ptr),
value :: mask_d
163 integer(c_int) :: mask_size
168 bind(c, name =
'cuda_sub3_mask')
169 import c_rp, c_int, c_ptr
170 type(c_ptr),
value :: a_d
171 type(c_ptr),
value :: b_d
172 type(c_ptr),
value :: c_d
173 integer(c_int) :: size
174 type(c_ptr),
value :: mask_d
175 integer(c_int) :: mask_size
185 subroutine device_copy_mask(a_d, b_d, size, mask_d, mask_size)
189 type(c_ptr) :: mask_d
196 call neko_error(
'No device backend configured for device_copy_mask')
198 end subroutine device_copy_mask
200 subroutine device_cadd_mask(a_d, c, size, mask_d, mask_size)
202 real(kind=rp),
intent(in) :: c
204 type(c_ptr) :: mask_d
211 call neko_error(
'No device backend configured for device_cadd_mask')
213 end subroutine device_cadd_mask
215 subroutine device_invcol1_mask(a_d, size, mask_d, mask_size)
218 type(c_ptr) :: mask_d
225 call neko_error(
'No device backend configured for device_invcol1_mask')
227 end subroutine device_invcol1_mask
229 subroutine device_col2_mask(a_d, b_d, size, mask_d, mask_size)
233 type(c_ptr) :: mask_d
240 call neko_error(
'No device backend configured for device_col2_mask')
242 end subroutine device_col2_mask
244 subroutine device_col3_mask(a_d, b_d, c_d, size, mask_d, mask_size)
249 type(c_ptr) :: mask_d
256 call neko_error(
'No device backend configured for device_col3_mask')
258 end subroutine device_col3_mask
260 subroutine device_sub3_mask(a_d, b_d, c_d, size, mask_d, mask_size)
265 type(c_ptr) :: mask_d
272 call neko_error(
'No device backend configured for device_sub3_mask')
274 end subroutine device_sub3_mask
276end module device_math_ext