Skip to content

Commit

Permalink
Fix unbroadcast_prod_*() for CuArrays
Browse files Browse the repository at this point in the history
  • Loading branch information
dfdx committed Feb 8, 2020
1 parent 268c75d commit 4911d5b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ end
unbroadcast_prod_y(x::AbstractArray, y::AbstractArray, Δ) = unbroadcast_prod_x(y, x, Δ)


unbroadcast_prod_x(x::Number, y::AbstractArray, Δ) = unbroadcast_prod_x([x], y, Δ)[1]
unbroadcast_prod_x(x::AbstractArray, y::Number, Δ) = unbroadcast_prod_x(x, [y], Δ)
unbroadcast_prod_y(x::AbstractArray, y::Number, Δ) = unbroadcast_prod_y(x, [y], Δ)[1]
unbroadcast_prod_y(x::Number, y::AbstractArray, Δ) = unbroadcast_prod_y([x], y, Δ)
unbroadcast_prod_x(x::Number, y::AbstractArray, Δ) = unbroadcast_prod_x(convert(typeof(y), [x]), y, Δ)[1]
unbroadcast_prod_x(x::AbstractArray, y::Number, Δ) = unbroadcast_prod_x(x, convert(typeof(x), [y]), Δ)
unbroadcast_prod_y(x::AbstractArray, y::Number, Δ) = unbroadcast_prod_y(x, convert(typeof(x), [y]), Δ)[1]
unbroadcast_prod_y(x::Number, y::AbstractArray, Δ) = unbroadcast_prod_y(convert(typeof(y), [x]), y, Δ)


untranspose_vec(ds::Transpose{T, <:AbstractVector{T}}) where T = transpose(ds)
Expand Down

0 comments on commit 4911d5b

Please sign in to comment.