acc_stream_destroy Subroutine

public subroutine acc_stream_destroy(this)

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

Arguments

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

Contents

Source Code


Source Code

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

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