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

Incomplete header annotations #13

Open
HerbertJordan opened this issue Sep 12, 2018 · 3 comments
Open

Incomplete header annotations #13

HerbertJordan opened this issue Sep 12, 2018 · 3 comments

Comments

@HerbertJordan
Copy link
Member

As can be observed when generating code for the pic_tracer example, the header include <random> is missing for

  • std::uniform_real_distribution
  • std::linear_congruential_engine

Both types are used in the generated code, in their qualified name. However, the corresponding include pragma is missing.

@destructor64
Copy link

This might be related to the "fix" I commited recently (28bb032) along with the API commit allscale/allscale_api@d006bb9

So my first try to fix this would be to include <random> right at the top before including anything from the AllScale API, as a fast workaround. Maybe this will help.

After a quick glance at the source, the pic_tracer doesn't include <random> at all, so it only gets that stuff via transitive includes, which are evil by design IMHO ;-)

@HerbertJordan
Copy link
Member Author

The pic_tracer translation unit includes the cell.h which in turns includes <random>.

Since the pic_tracer.cxx file is only referencing symbols defined in cell.h, I think this is the clean way to handle this. The fact that cell.h requires symbolc ins <random> for its definitions is an implementation detail pic_tracer.cxx should not be concerned with.

It is not the case that pic_tracer.cxx is relying on <random> to be included by cell.h to access symbols defined in <random>.

@destructor64
Copy link

destructor64 commented Sep 12, 2018

I fully agree with that.

But I still guess the reason for this problem is, that pic_tracer.cxx gets <random> included transitively via some intercepted header - namely something in the AllScale API.

My assumption is, that moving the two AllScale API includes after the ipic3d includes might solve this problem here.

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