acc_event_create Subroutine

public subroutine acc_event_create(this)

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

Arguments

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

Source Code

   SUBROUTINE acc_event_create(this)
      !! Fortran-wrapper for creation 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 (C_ASSOCIATED(this%cptr)) &
         DBCSR_ABORT("acc_event_create: already allocated")
      CALL dbcsr_acc_set_active_device(get_accdrv_active_device_id())
      istat = acc_interface_event_create(this%cptr)
      IF (istat /= 0 .OR. .NOT. C_ASSOCIATED(this%cptr)) &
         DBCSR_ABORT("acc_event_create: failed")
#endif
   END SUBROUTINE acc_event_create