Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThreadsX.sum is not type inferable #182

Closed
mohamed82008 opened this issue Nov 14, 2021 · 2 comments
Closed

ThreadsX.sum is not type inferable #182

mohamed82008 opened this issue Nov 14, 2021 · 2 comments

Comments

@mohamed82008
Copy link

Hi!

Thanks for this really nice package. I noticed that the ThreadsX.sum function can't be inferred properly in Julia 1.6.

julia> @code_warntype ThreadsX.sum(log, rand(100))
Variables
  #self#::Core.Const(ThreadsX.sum)
  f::Core.Const(log)
  itr::Vector{Float64}

Body::Any
1%1 = Core.NamedTuple()::Core.Const(NamedTuple())
│   %2 = Base.pairs(%1)::Core.Const(Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}())
│   %3 = ThreadsX.Implementations.:(var"#sum#14")(%2, #self#, f, itr)::Any
└──      return %3
@tkf
Copy link
Owner

tkf commented Nov 14, 2021

I think we can solve this in recent Julia. Let's track this issue in #166 since at the lowest layer it's the same issue.

@tkf tkf closed this as completed Nov 14, 2021
@tkf tkf reopened this Nov 14, 2021
@tkf
Copy link
Owner

tkf commented Nov 14, 2021

duplicate of #166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants