Returns a logical, which indicates if the given devmem is allocated.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(acc_devmem_type), | intent(in) | :: | this |
true if device memory is allocated, false otherwise
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 res = this%size_in_bytes >= 0 END FUNCTION acc_devmem_allocated