Skip to content

Commit 811e0f7

Browse files
committed
Update docstrings
1 parent 38f6180 commit 811e0f7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/KernelAbstractions.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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)`
@@ -558,7 +558,8 @@ end
558558
zeros(::Backend, Type, dims...; unified=false)::AbstractArray
559559
560560
Allocate 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
"""
563564
zeros(backend::Backend, T::Type, dims...; kwargs...) = zeros(backend, T, dims; kwargs...)
564565
function zeros(backend::Backend, ::Type{T}, dims::Tuple; kwargs...) where {T}
@@ -571,7 +572,8 @@ end
571572
ones(::Backend, Type, dims...; unified=false)::AbstractArray
572573
573574
Allocate 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
"""
576578
ones(backend::Backend, T::Type, dims...; kwargs...) = ones(backend, T, dims; kwargs...)
577579
function ones(backend::Backend, ::Type{T}, dims::Tuple; kwargs...) where {T}

0 commit comments

Comments
 (0)