export_field_to_device Subroutine

public subroutine export_field_to_device(self, buffer, f, dims, to_sp)

Pack the first dims Cartesian points of field f into a contiguous device buffer, in (i, j, k) order without padding.

buffer is the device address of product(dims) elements, of kind sp when to_sp is true and dp otherwise. The buffer holds the complete result when this returns, so a library that reads device memory outside the backend's stream can consume it directly. Only called when supports_device_field_export(f) is true.

Type Bound

base_backend_t

Arguments

Type IntentOptional Attributes Name
class(base_backend_t) :: self
type(c_ptr), intent(in) :: buffer
class(field_t), intent(in) :: f
integer, intent(in) :: dims(3)
logical, intent(in) :: to_sp

Calls

proc~~export_field_to_device~~CallsGraph proc~export_field_to_device m_base_backend::base_backend_t%export_field_to_device proc~abort_run m_logger::abort_run proc~export_field_to_device->proc~abort_run interface~str m_logger::str proc~abort_run->interface~str mpi_abort mpi_abort proc~abort_run->mpi_abort mpi_barrier mpi_barrier proc~abort_run->mpi_barrier mpi_comm_rank mpi_comm_rank proc~abort_run->mpi_comm_rank mpi_comm_size mpi_comm_size proc~abort_run->mpi_comm_size mpi_finalized mpi_finalized proc~abort_run->mpi_finalized mpi_initialized mpi_initialized proc~abort_run->mpi_initialized