@@ -534,9 +534,9 @@ Adapt.adapt_storage(::CPU, a::Array) = a
534534"""
535535 allocate(::Backend, Type, dims...; unified=false)::AbstractArray
536536
537- Allocate a storage array appropriate for the computational backend. `unified`
538- allocates an array using unified memory if the backend supports it. Use
539- [`supports_unified`](@ref) to determine whether it is supported by a backend.
537+ Allocate a storage array appropriate for the computational backend. `unified=true `
538+ allocates an array using unified memory if the backend supports it and throws otherwise.
539+ Use [`supports_unified`](@ref) to determine whether it is supported by a backend.
540540
541541!!! note
542542 Backend implementations **must** implement `allocate(::NewBackend, T, dims::Tuple)`
558558 zeros(::Backend, Type, dims...; unified=false)::AbstractArray
559559
560560Allocate a storage array appropriate for the computational backend filled with zeros.
561- `unified` allocates an array using unified memory if the backend supports it.
561+ `unified=true` allocates an array using unified memory if the backend supports it and
562+ throws otherwise.
562563"""
563564zeros (backend:: Backend , T:: Type , dims... ; kwargs... ) = zeros (backend, T, dims; kwargs... )
564565function zeros (backend:: Backend , :: Type{T} , dims:: Tuple ; kwargs... ) where {T}
571572 ones(::Backend, Type, dims...; unified=false)::AbstractArray
572573
573574Allocate a storage array appropriate for the computational backend filled with ones.
574- `unified` allocates an array using unified memory if the backend supports it.
575+ `unified=true` allocates an array using unified memory if the backend supports it and
576+ throws otherwise.
575577"""
576578ones (backend:: Backend , T:: Type , dims... ; kwargs... ) = ones (backend, T, dims; kwargs... )
577579function ones (backend:: Backend , :: Type{T} , dims:: Tuple ; kwargs... ) where {T}
0 commit comments