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_cadd_mask')
46 import c_rp, c_int, c_ptr
47 type(c_ptr),
value :: a_d
49 integer(c_int) :: size
50 type(c_ptr),
value :: mask_d
51 integer(c_int) :: mask_size
56 bind(c, name =
'hip_invcol1_mask')
57 import c_rp, c_int, c_ptr
58 type(c_ptr),
value :: a_d
59 integer(c_int) :: size
60 type(c_ptr),
value :: mask_d
61 integer(c_int) :: mask_size
66 bind(c, name =
'hip_col2_mask')
67 import c_rp, c_int, c_ptr
68 type(c_ptr),
value :: a_d
69 type(c_ptr),
value :: b_d
70 integer(c_int) :: size
71 type(c_ptr),
value :: mask_d
72 integer(c_int) :: mask_size
77 bind(c, name =
'hip_col3_mask')
78 import c_rp, c_int, c_ptr
79 type(c_ptr),
value :: a_d
80 type(c_ptr),
value :: b_d
81 type(c_ptr),
value :: c_d
82 integer(c_int) :: size
83 type(c_ptr),
value :: mask_d
84 integer(c_int) :: mask_size
89 bind(c, name =
'hip_sub3_mask')
90 import c_rp, c_int, c_ptr
91 type(c_ptr),
value :: a_d
92 type(c_ptr),
value :: b_d
93 type(c_ptr),
value :: c_d
94 integer(c_int) :: size
95 type(c_ptr),
value :: mask_d
96 integer(c_int) :: mask_size
104 bind(c, name =
'cuda_cadd_mask')
105 import c_rp, c_int, c_ptr
106 type(c_ptr),
value :: a_d
108 integer(c_int) :: size
109 type(c_ptr),
value :: mask_d
110 integer(c_int) :: mask_size
115 bind(c, name =
'cuda_invcol1_mask')
116 import c_rp, c_int, c_ptr
117 type(c_ptr),
value :: a_d
118 integer(c_int) :: size
119 type(c_ptr),
value :: mask_d
120 integer(c_int) :: mask_size
125 bind(c, name =
'cuda_col2_mask')
126 import c_rp, c_int, c_ptr
127 type(c_ptr),
value :: a_d
128 type(c_ptr),
value :: b_d
129 integer(c_int) :: size
130 type(c_ptr),
value :: mask_d
131 integer(c_int) :: mask_size
136 bind(c, name =
'cuda_col3_mask')
137 import c_rp, c_int, c_ptr
138 type(c_ptr),
value :: a_d
139 type(c_ptr),
value :: b_d
140 type(c_ptr),
value :: c_d
141 integer(c_int) :: size
142 type(c_ptr),
value :: mask_d
143 integer(c_int) :: mask_size
148 bind(c, name =
'cuda_sub3_mask')
149 import c_rp, c_int, c_ptr
150 type(c_ptr),
value :: a_d
151 type(c_ptr),
value :: b_d
152 type(c_ptr),
value :: c_d
153 integer(c_int) :: size
154 type(c_ptr),
value :: mask_d
155 integer(c_int) :: mask_size
165 subroutine device_cadd_mask(a_d, c, size, mask_d, mask_size)
167 real(kind=rp),
intent(in) :: c
169 type(c_ptr) :: mask_d
176 call neko_error(
'No device backend configured for device_cadd_mask')
178 end subroutine device_cadd_mask
180 subroutine device_invcol1_mask(a_d, size, mask_d, mask_size)
183 type(c_ptr) :: mask_d
190 call neko_error(
'No device backend configured for device_invcol1_mask')
192 end subroutine device_invcol1_mask
194 subroutine device_col2_mask(a_d, b_d, size, mask_d, mask_size)
198 type(c_ptr) :: mask_d
205 call neko_error(
'No device backend configured for device_col2_mask')
207 end subroutine device_col2_mask
209 subroutine device_col3_mask(a_d, b_d, c_d, size, mask_d, mask_size)
214 type(c_ptr) :: mask_d
221 call neko_error(
'No device backend configured for device_col3_mask')
223 end subroutine device_col3_mask
225 subroutine device_sub3_mask(a_d, b_d, c_d, size, mask_d, mask_size)
230 type(c_ptr) :: mask_d
237 call neko_error(
'No device backend configured for device_sub3_mask')
239 end subroutine device_sub3_mask
241end module device_math_ext