acc_event_synchronize Subroutine

public subroutine acc_event_synchronize(this)

Fortran-wrapper for waiting for the completion of a HIP/CUDA event.

Arguments

Type IntentOptional Attributes Name
type(acc_event_type), intent(in) :: this

Source Code

   SUBROUTINE acc_event_synchronize(this)
      !! Fortran-wrapper for waiting for the completion of a HIP/CUDA event.

      TYPE(acc_event_type), INTENT(IN)  :: this

#if ! defined (__DBCSR_ACC)
      MARK_USED(this)
      DBCSR_ABORT("__DBCSR_ACC not compiled in.")
#else
      INTEGER                                  :: istat
      IF (.NOT. C_ASSOCIATED(this%cptr)) &
         DBCSR_ABORT("acc_event_synchronize: event not allocated")
      CALL dbcsr_acc_set_active_device(get_accdrv_active_device_id())
      istat = acc_interface_event_synchronize(this%cptr)
      IF (istat < 0) &
         DBCSR_ABORT("acc_event_synchronize failed")
#endif
   END SUBROUTINE acc_event_synchronize