40 use,
intrinsic :: iso_c_binding
45 real(kind=
rp),
allocatable :: x(:,:)
46 type(c_ptr) :: x_d = c_null_ptr
72 integer,
intent(in) :: nrows
73 integer,
intent(in) :: ncols
77 allocate(m%x(nrows, ncols))
94 if (
allocated(m%x))
then
98 if (c_associated(m%x_d))
then
120 if (
allocated(m%x))
then
124 if (.not.
allocated(m%x))
then
129 allocate(m%x(m%nrows, m%ncols))
148 real(kind=
rp),
intent(in) :: s
150 if (.not.
allocated(m%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.
subroutine matrix_free(m)
Deallocate a matrix.
subroutine matrix_assign_matrix(m, w)
Assignment .
integer function matrix_size(m)
Returns the number of entries in the matrix.
subroutine matrix_assign_scalar(m, s)
Assignment .
subroutine matrix_init(m, nrows, ncols)
Initialise a matrix of size nrows*ncols.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.