acc_stream_synchronize Subroutine

public subroutine acc_stream_synchronize(this)

Fortran-wrapper for waiting for CUDA/HIP stream tasks to complete.

Arguments

TypeIntentOptionalAttributesName
type(acc_stream_type), intent(in) :: this

Contents


Source Code

   SUBROUTINE acc_stream_synchronize(this)
      !! Fortran-wrapper for waiting for CUDA/HIP stream tasks to complete.

      TYPE(acc_stream_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_stream_synchronize: stream not allocated")
      istat = acc_interface_stream_sync(this%cptr)
      IF (istat /= 0) &
         DBCSR_ABORT("acc_stream_synchronize failed")
#endif
   END SUBROUTINE acc_stream_synchronize