@@ -533,15 +533,15 @@ Allocate a storage array appropriate for the computational backend.
533533!!! note
534534 Backend implementations **must** implement `allocate(::NewBackend, T, dims::Tuple)`
535535"""
536- allocate (backend:: Backend , T, dims... ) = allocate (backend, T, dims)
537- allocate (backend:: Backend , T, dims:: Tuple ) = throw (MethodError (allocate, (backend, T, dims)))
536+ allocate (backend:: Backend , T:: Type , dims... ) = allocate (backend, T, dims)
537+ allocate (backend:: Backend , T:: Type , dims:: Tuple ) = throw (MethodError (allocate, (backend, T, dims)))
538538
539539"""
540540 zeros(::Backend, Type, dims...)::AbstractArray
541541
542542Allocate a storage array appropriate for the computational backend filled with zeros.
543543"""
544- zeros (backend:: Backend , T, dims... ) = zeros (backend, T, dims)
544+ zeros (backend:: Backend , T:: Type , dims... ) = zeros (backend, T, dims)
545545function zeros (backend:: Backend , :: Type{T} , dims:: Tuple ) where {T}
546546 data = allocate (backend, T, dims... )
547547 fill! (data, zero (T))
553553
554554Allocate a storage array appropriate for the computational backend filled with ones.
555555"""
556- ones (backend:: Backend , T, dims... ) = ones (backend, T, dims)
556+ ones (backend:: Backend , T:: Type , dims... ) = ones (backend, T, dims)
557557function ones (backend:: Backend , :: Type{T} , dims:: Tuple ) where {T}
558558 data = allocate (backend, T, dims)
559559 fill! (data, one (T))
0 commit comments