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

Target attribute definition #338

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

nemothenoone
Copy link

Target attribute definition introduces function multi-versioning.

@jzmaddock
Copy link
Collaborator

What's the motivation for adding this to Boost.Config rather than the specific library that needs it - or is there a need across multiple libraries?

@nemothenoone
Copy link
Author

nemothenoone commented Jul 26, 2020

Hm. Good question. I was thinking of some kind of architecture-specific function selection macro for Boost.Multiprecision, Boost.Math and for one more library coming. I think lots of architecture-specific places (e.g. with intrinsics) across the whole Boost suite could use this macro.

I believe the statement above requires some particular proofs of this being needed, so I don't mind if this does not gets accepted until I provide those.

@jzmaddock
Copy link
Collaborator

My inclination is to not merge this at this time - the rational is:

  • It's completely compiler specific (not necessarily a show stopper).
  • It's not required by multiple Boost libraries yet.

But... I can see the logic so let's leave it open for now.

What tends to happen with rather specific stuff like this, is they get trialled in a particular library first, and then moved here when more than one library needs them, or else when the configuration is clearly more easily done via the logic that Boost.Config already has.

With regard to multiprecision, what we've done so far is just tip a toe into the water of using intrinsics, but these are abstracted so that the actual code doesn't have to deal with 32/64 bit issues, or compiler specific stuff (ie works with msvc as well as gcc): https://github.com/boostorg/multiprecision/blob/develop/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp.

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

Successfully merging this pull request may close these issues.

None yet

2 participants