Thin polymorphic wrapper. A type-bound procedure’s passed object
must be class(...), but mapping a polymorphic list item into a
target / offload region is unspecified behaviour (gfortran
-Wopenmp; see FORTRAN_STYLE.md) — so the do concurrent kernels
live in the type(ocean_vcoord_t) _impl and this wrapper only
resolves the concrete type. ocean_vcoord_t is never extended,
so the dynamic type is always the declared type. Mirrors the
enter_data/exit_data split.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_vcoord_t), | intent(inout) | :: | this | |||
| real(kind=wp), | intent(in) | :: | total_h(:,:) | |||
| real(kind=wp), | intent(in) | :: | eta(:,:) |
pure subroutine ocean_vcoord_compute_target_h(this, total_h, eta) !! Thin polymorphic wrapper. A type-bound procedure's passed object !! must be `class(...)`, but mapping a polymorphic list item into a !! `target` / offload region is unspecified behaviour (gfortran !! `-Wopenmp`; see FORTRAN_STYLE.md) — so the `do concurrent` kernels !! live in the `type(ocean_vcoord_t)` `_impl` and this wrapper only !! resolves the concrete type. `ocean_vcoord_t` is never extended, !! so the dynamic type is always the declared type. Mirrors the !! enter_data/exit_data split. class(ocean_vcoord_t), intent(inout) :: this real(wp), intent(in) :: total_h(:, :) ! assumed-shape-ok: thin TBP wrapper, no kernel real(wp), intent(in) :: eta(:, :) ! assumed-shape-ok: thin TBP wrapper, no kernel select type (this) type is (ocean_vcoord_t) call ocean_vcoord_compute_target_h_impl(this, total_h, eta) end select end subroutine ocean_vcoord_compute_target_h