The last example won't work even with this fixed. There is a PR for making
that one work already, but that will have to wait a bit longer.
On Thursday, August 4, 2016 at 9:37:30 AM UTC+2, Oliver Schulz wrote:
>
> Thanks for the heads-up. I tried it out, and indeed
>
> broadcast(muladd, rand(5), rand(5), rand(5))
>
> and
>
> broadcast(muladd, rand(5), 1, rand(5))
>
> work now. Interestingly,
>
> broadcast(muladd, rand(5), rand(5), 1)
>
> Does not ("no method matching promote_eltype_op[...]"). Just curious, is
> this to be expected?
>
> On Thursday, August 4, 2016 at 5:36:14 AM UTC+2, Kevin Squire wrote:
>>
>> For completeness, PR #17389 was merged
>> <https://github.com/JuliaLang/julia/pull/17389>, and issue #17314 was
>> closed <https://github.com/JuliaLang/julia/issues/17314>.
>>
>> Cheers,
>> Kevin
>>
>> On Mon, Aug 1, 2016 at 8:28 AM, Oliver Schulz <[email protected]>
>> wrote:
>>
>>> Thanks, Pablo. Uh, do you think that PR will make it into 0.5?
>>>
>>>
>>> On Monday, August 1, 2016 at 3:41:23 PM UTC+2, Pablo Zubieta wrote:
>>>>
>>>> This should work if https://github.com/JuliaLang/julia/pull/17389 gets
>>>> merged.
>>>>
>>>> On Monday, August 1, 2016 at 3:06:36 PM UTC+2, Oliver Schulz wrote:
>>>>>
>>>>> > Not before the bug is fixed and this is also orthogonal to loop
>>>>> fusion.
>>>>>
>>>>> Sure, I get that. But that means then that bug is fixed, things like
>>>>> broadcasting with (e.g.) muladd will be possible again? That would be
>>>>> wonderful!
>>>>>
>>>>>
>>>>>
>>>>> On Monday, August 1, 2016 at 2:47:44 PM UTC+2, Yichao Yu wrote:
>>>>>>
>>>>>> On Mon, Aug 1, 2016 at 8:41 PM, Oliver Schulz
>>>>>> <[email protected]> wrote:
>>>>>> > So cases like
>>>>>> >
>>>>>> > broadcast((x,y,z)->..., A, B, C)
>>>>>> >
>>>>>> > can't be supported any longer? Darn. :-( I love the things you guys
>>>>>> are
>>>>>> > doing in regard to fusing operations, but that was a very, very
>>>>>> useful thing
>>>>>> > to have. Is there any other way to do this now?
>>>>>>
>>>>>> Not before the bug is fixed and this is also orthogonal to loop
>>>>>> fusion.
>>>>>>
>>>>>> >
>>>>>> > On Monday, August 1, 2016 at 2:22:07 PM UTC+2, Yichao Yu wrote:
>>>>>> >>
>>>>>> >> On Mon, Aug 1, 2016 at 8:15 PM, Oliver Schulz
>>>>>> >> <[email protected]> wrote:
>>>>>> >> > Hi,
>>>>>> >> >
>>>>>> >> > sorry if this is already covered somewhere - have the semantics
>>>>>> of
>>>>>> >> > broadcast
>>>>>> >> > changed in Julia 0.5?
>>>>>> >>
>>>>>> >> Essentially https://github.com/JuliaLang/julia/issues/17314
>>>>>> >> The promote_op basically assumes everything is a pure unary or
>>>>>> binary
>>>>>> >> operator.
>>>>>> >>
>>>>>> >> >
>>>>>> >> > In 0.4, I can do
>>>>>> >> >
>>>>>> >> > broadcast(muladd, rand(5), rand(5), rand(5))
>>>>>> >> >
>>>>>> >> > But in 0.5 (0.5.0-rc0+86), I get
>>>>>> >> >
>>>>>> >> > ERROR: MethodError: no method matching muladd(::Float64,
>>>>>> ::Float64)
>>>>>> >> > Closest candidates are:
>>>>>> >> > muladd(::Float64, ::Float64, ::Float64) at float.jl:247
>>>>>> >> > muladd(::Real, ::Real, ::Complex{T<:Real}) at complex.jl:177
>>>>>> >> > muladd{T<:Number}(::T<:Number, ::T<:Number, ::T<:Number) at
>>>>>> >> > promotion.jl:239
>>>>>> >> > ...
>>>>>> >> > [...]
>>>>>> >> >
>>>>>> >> >
>>>>>> >> > Is this a bug, or to be expected?
>>>>>> >> >
>>>>>> >> > Cheers,
>>>>>> >> >
>>>>>> >> > Oliver
>>>>>> >> >
>>>>>>
>>>>>
>>