warp.can_access#
- warp.can_access(device, resource)[source]#
Return whether
devicecan directly accessresource.In this release,
resourcemust be a concrete Warp array. The query uses the resource’s observed memory kind where available, including CUDA managed, CUDA device, CUDA mempool, and pinned host memory, and returnsFalsewhen access cannot be verified.- Parameters:
device (Device | str | None) – The device that needs to access
resource.resource – The resource to query. Concrete Warp array instances such as
warp.arrayandwarp.indexedarrayare currently supported.
- Returns:
Trueif Warp can verify thatdevicecan directly accessresource, otherwiseFalse.- Raises:
TypeError – If
resourceis not a concrete Warp array.- Return type: