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

inline x^literal only for hardware-based number types x #20782

Merged
merged 1 commit into from
Feb 25, 2017

Conversation

stevengj
Copy link
Member

Closes #20768.

@stevengj
Copy link
Member Author

Since it seems on #20768 that everyone prefers this behavior, hopefully this can be merged soon?

@StefanKarpinski
Copy link
Sponsor Member

StefanKarpinski commented Feb 24, 2017

Is there a simple way for user-defined types to opt into this behavior? (Separate issue.)

@StefanKarpinski
Copy link
Sponsor Member

Since this passes tests and is strictly more conservative that the current state, seems like we should just go ahead and merge this. Let's leave it open for a bit in case there are any objections.

@stevengj
Copy link
Member Author

stevengj commented Feb 24, 2017

Okay, will merge once tests are green again (now that the conflict is resolved).

For user-defined types to opt-in, I suppose we could define some kind of trait. But I'm not sure how many types will actually want to opt-in, so it may not be worth it. (That's one of the reasons why in #20637 I separated the inlining code into a function, so that other types could call this code-generation routine easily.)

@stevengj
Copy link
Member Author

stevengj commented Feb 24, 2017

Darn it, messed up the rebase ... okay, should be fixed now.

@stevengj stevengj merged commit 6ac7e24 into JuliaLang:master Feb 25, 2017
@andyferris
Copy link
Member

So packages can still make good use of internal_pow{N}(x::MyType, ::Type{Val{N}})?

@stevengj
Copy link
Member Author

@andyferris, yes, although there's no reason for packages to not just directly override ^{p}(x::MyType, ::Type{Val{p}}) ... they shouldn't have to know about internal_pow.

@stevengj stevengj deleted the inlinepow_hwonly branch February 25, 2017 14:11
tkelman added a commit that referenced this pull request Apr 21, 2017
#20648 was partially reverted by #20782
tkelman added a commit that referenced this pull request Apr 22, 2017
#20648 was partially reverted by #20782
tkelman added a commit that referenced this pull request Apr 23, 2017
* run NEWS-update.jl

#20648 was partially reverted by #20782

* Fix doctest line numbers

* Upgrade Documenter, add linkcheck exception

bugs.kde.org fails to load from nanosoldier for some reason,
gives a CURLE_RECV_ERROR (56) Failure with receiving network data

fix alloc.c dead link in devdocs/init.md

* fix timeit_init macro in test/perf/perfutil.jl

needed to escape its arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:maths Mathematical functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants