acc_event_destroy Subroutine

public subroutine acc_event_destroy(this)

Fortran-wrapper for destruction of a CUDA/HIP event.

Arguments

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

Source Code

   SUBROUTINE acc_event_destroy(this)
      !! Fortran-wrapper for destruction of a CUDA/HIP event.

      TYPE(acc_event_type), &
         INTENT(INOUT)                          :: 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_destroy: event not allocated")
      CALL dbcsr_acc_set_active_device(get_accdrv_active_device_id())
      istat = acc_interface_event_destroy(this%cptr)
      IF (istat /= 0) &
         DBCSR_ABORT("acc_event_destroy failed")
      this%cptr = C_NULL_PTR
#endif
   END SUBROUTINE acc_event_destroy