-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
…rse vectors/matrices. Makes broadcast! dispatch on container type (as broadcast), and inject generic sparse broadcast! for the appropriate container type.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,7 +202,9 @@ Note that `dest` is only used to store the result, and does not supply | |
arguments to `f` unless it is also listed in the `As`, | ||
as in `broadcast!(f, A, A, B)` to perform `A[:] = broadcast(f, A, B)`. | ||
""" | ||
@inline function broadcast!{N}(f, C::AbstractArray, A, Bs::Vararg{Any,N}) | ||
@inline broadcast!{N}(f, C::AbstractArray, A, Bs::Vararg{Any,N}) = | ||
broadcast_c!(f, containertype(C, A, Bs...), C, A, Bs...) | ||
@inline function broadcast_c!{N}(f, ::Type, C::AbstractArray, A, Bs::Vararg{Any,N}) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Sacha0
Author
Member
|
||
shape = indices(C) | ||
@boundscheck check_broadcast_indices(shape, A, Bs...) | ||
keeps, Idefaults = map_newindexer(shape, A, Bs) | ||
|
@Sacha0 Why do you need the
::Type
argument here? Why not just use the type of the destination array instead?