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

Preprocessing limits are broken #978

Closed
K-ballo opened this issue Oct 21, 2013 · 4 comments
Closed

Preprocessing limits are broken #978

K-ballo opened this issue Oct 21, 2013 · 4 comments

Comments

@K-ballo
Copy link
Member

K-ballo commented Oct 21, 2013

There are a number of issues with preprocessing limits:

  • HPX_*_LIMIT do not always reflect the actual limits.
  • The limits reported aren't always available, as some limits are shifted but still capped by HPX_MAX_LIMIT.
  • For shifted limits, preprocessed files support more arguments than their name implies, but those are never used since the selector files do not consider the shifting.
  • If limits other than HPX_LIMIT can be user defined, alternative symbols that are properly rounded should be used internally instead when using preprocessed files.
  • Some limits are just plain wrong.
@hkaiser
Copy link
Member

hkaiser commented Oct 22, 2013

  • Some limits are just plain wrong

The whole concept of using the preprocessor to define a set of variadic overloads for a function is plain wrong :-P

@K-ballo
Copy link
Member Author

K-ballo commented Oct 22, 2013

    Some limits are just plain wrong

The whole concept of using the preprocessor to define a set of variadic overloads for a function is plain wrong :-P

Are you suggesting we move to true variadics?

@K-ballo
Copy link
Member Author

K-ballo commented Oct 24, 2013

The limits branch has my take on preprocessing limits.

HPX_*_LIMIT do not always reflect the actual limits.
  • Now they do.
The limits reported aren't always available, as some limits are shifted but still capped by HPX_MAX_LIMIT.
  • Limits reported are always available, as preprocessed generated files are not capped by HPX_MAX_LIMIT.
For shifted limits, preprocessed files support more arguments than their name implies, but those are never used since the selector files do not consider the shifting.
  • Selector files only consider the base limit, not the shifted ones, thus the correct ones are picked.
If limits other than `HPX_LIMIT` can be user defined, alternative symbols that are properly rounded should be used internally instead when using preprocessed files.
  • Only HPX_LIMIT can be user defined, defining one of the other limits results in an #error.
Some limits are just plain wrong.
  • Fixed

Additionally, I removed HPX_PP_ADD3 and HPX_PP_ROUND_UP_ADD3 as they were only used in a handful of places within a single file. I replaced those use cases by BOOST_PP_ADD instead.

Comments?

@hkaiser
Copy link
Member

hkaiser commented Oct 24, 2013

Looks great! Marvelous. Please feel free to merge if tests are no more broken than before :-P

@ghost ghost assigned K-ballo Nov 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants