acc_devmem_allocated Function

public function acc_devmem_allocated(this) result(res)

Returns a logical, which indicates if the given devmem is allocated.

Arguments

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

Return Value logical

true if device memory is allocated, false otherwise


Source Code

   FUNCTION acc_devmem_allocated(this) RESULT(res)
      !! Returns a logical, which indicates if the given devmem is allocated.

      TYPE(acc_devmem_type), INTENT(IN)                  :: this
      LOGICAL                                            :: res
         !! true if device memory is allocated, false otherwise

#if defined (__DBCSR_ACC)
      DBCSR_ASSERT(C_ASSOCIATED(this%cptr) .OR. this%size_in_bytes <= 0)
#endif

      res = this%size_in_bytes >= 0
   END FUNCTION acc_devmem_allocated