36 use device,
only : glb_cmd_queue
37 use,
intrinsic :: iso_c_binding, only : c_ptr, c_int
44 bind(c, name=
'hip_schwarz_extrude')
45 use,
intrinsic :: iso_c_binding
48 type(c_ptr),
value :: arr1_d, arr2_d, stream
49 integer(c_int) :: l1, l2, nx, nelv
54 bind(c, name=
'hip_schwarz_toext3d')
55 use,
intrinsic :: iso_c_binding
58 type(c_ptr),
value :: a_d, b_d, stream
59 integer(c_int) :: nx, nelv
62 bind(c, name=
'hip_schwarz_toreg3d')
63 use,
intrinsic :: iso_c_binding
66 type(c_ptr),
value :: a_d, b_d, stream
67 integer(c_int) :: nx, nelv
73 bind(c, name=
'cuda_schwarz_extrude')
74 use,
intrinsic :: iso_c_binding
77 type(c_ptr),
value :: arr1_d, arr2_d, stream
79 integer(c_int) :: l1, l2, nx, nelv
83 bind(c, name=
'cuda_schwarz_toext3d')
84 use,
intrinsic :: iso_c_binding
87 type(c_ptr),
value :: a_d, b_d , stream
88 integer(c_int) :: nx, nelv
91 bind(c, name=
'cuda_schwarz_toreg3d')
92 use,
intrinsic :: iso_c_binding
95 type(c_ptr),
value :: a_d, b_d, stream
96 integer(c_int) :: nx, nelv
102 bind(c, name=
'opencl_schwarz_extrude')
103 use,
intrinsic :: iso_c_binding
106 type(c_ptr),
value :: arr1_d, arr2_d, stream
107 integer(c_int) :: l1, l2, nx, nelv
111 bind(c, name=
'opencl_schwarz_toext3d')
112 use,
intrinsic :: iso_c_binding
115 type(c_ptr),
value :: a_d, b_d, stream
116 integer(c_int) :: nx, nelv
119 bind(c, name=
'opencl_schwarz_toreg3d')
120 use,
intrinsic :: iso_c_binding
123 type(c_ptr),
value :: a_d, b_d, stream
124 integer(c_int) :: nx, nelv
133 subroutine device_schwarz_extrude(arr1_d,l1,f1,arr2_d,l2,f2,nx,ny,nz, nelv, stream)
134 integer,
intent(in) :: l1,l2,nx,ny,nz, nelv
135 type(c_ptr),
intent(inout) :: arr1_d,arr2_d
136 real(kind=
rp),
intent(in) :: f1,f2
137 type(c_ptr),
optional :: stream
138 if (.not.
present(stream))
then
139 stream = glb_cmd_queue
148 call neko_error(
'No device backend configured')
153 integer,
intent(in) :: nx, nelv
154 type(c_ptr) :: a_d, b_d
155 type(c_ptr),
optional :: stream
156 if (.not.
present(stream))
then
157 stream = glb_cmd_queue
167 call neko_error(
'No device backend configured')
172 integer,
intent(in) :: nx, nelv
173 type(c_ptr) :: a_d, b_d
174 type(c_ptr),
optional :: stream
175 if (.not.
present(stream))
then
176 stream = glb_cmd_queue
185 call neko_error(
'No device backend configured')
subroutine, public device_schwarz_toreg3d(b_d, a_d, nx, nelv, stream)
subroutine, public device_schwarz_extrude(arr1_d, l1, f1, arr2_d, l2, f2, nx, ny, nz, nelv, stream)
subroutine, public device_schwarz_toext3d(a_d, b_d, nx, nelv, stream)
Device abstraction, common interface for various accelerators.
integer, parameter, public c_rp
integer, parameter, public rp
Global precision used in computations.
void opencl_schwarz_toreg3d(void *b, void *a, int *nx, int *nel)
void opencl_schwarz_toext3d(void *a, void *b, int *nx, int *nel)
void opencl_schwarz_extrude(void *arr1, int *l1, real *f1, void *arr2, int *l2, real *f2, int *nx, int *nel)
void cuda_schwarz_extrude(void *arr1, int *l1, real *f1, void *arr2, int *l2, real *f2, int *nx, int *nel, cudaStream_t stream)
void cuda_schwarz_toreg3d(void *b, void *a, int *nx, int *nel, cudaStream_t stream)
void cuda_schwarz_toext3d(void *a, void *b, int *nx, int *nel, cudaStream_t stream)