40 use,
intrinsic :: iso_c_binding
45 real(kind=
rp),
allocatable :: x(:)
46 type(c_ptr) :: x_d = c_null_ptr
67 integer,
intent(in) :: n
87 if (
allocated(v%x))
then
91 if (c_associated(v%x_d))
then
111 if (
allocated(v%x))
then
115 if (.not.
allocated(v%x))
then
137 real(kind=
rp),
intent(in) :: s
139 if (.not.
allocated(v%x))
then
Map a Fortran array to a device (allocate and associate)
subroutine, public device_copy(a_d, b_d, n)
subroutine, public device_cfill(a_d, c, n)
Device abstraction, common interface for various accelerators.
subroutine, public device_free(x_d)
Deallocate memory on the device.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
subroutine vector_init(v, n)
Initialise a vector of size n.
subroutine vector_assign_scalar(v, s)
Assignment .
integer function vector_size(v)
Return the number of entries in the vector.
subroutine vector_free(v)
Deallocate a vector.
subroutine vector_assign_vector(v, w)
Assignment .