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

VectorizedArray Warning #14247

Closed
peterrum opened this issue Sep 8, 2022 · 5 comments
Closed

VectorizedArray Warning #14247

peterrum opened this issue Sep 8, 2022 · 5 comments

Comments

@peterrum
Copy link
Member

peterrum commented Sep 8, 2022

Using GNU 9.4.0, we get the following warning:

usr/local/include/deal.II/base/vectorization.h:3267:7: note: ‘class dealii::VectorizedArray<double, 2>’ has no user-provided default constructor
 3267 | class VectorizedArray<double, 2>
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/deal.II/base/vectorization.h:3280:3: note: constructor is not user-provided because it is explicitly defaulted in the class body
 3280 |   VectorizedArray() = default;
      |   ^~~~~~~~~~~~~~~
/usr/local/include/deal.II/base/vectorization.h:3474:11: note: and the implicitly-defined constructor does not initialize ‘__m128d dealii::VectorizedArray<double, 2>::data’

@kronbichler I guess we are setting the values not to zero intentionally?

FYI @mschreter

@kronbichler
Copy link
Member

Yes, this is intentional, and it would indeed be very bad from a performance point of view if we had to initialize this field. What is the context in which a compiler would raise the warning, as I can't imagine (or don't hope) that it would always come up with the warning in regular code as we use it right now.

@peterrum
Copy link
Member Author

peterrum commented Sep 8, 2022

OK, it helped to initialize the object by 0.0, i.e., VectorizedArray<double> a = 0.0;, in user code. The warning is very cryptic but I don't know how to improve the situation.

@mschreter You had this problem also recently? Was that when you compiled deal.II or MeltPoolDG?

@mschreter
Copy link
Contributor

@peterrum I don't remember that this problem popped up at my configuration. Sorry :(.

@kronbichler
Copy link
Member

One should get a similar warning also for plain double variables, albeit in a different form (not complaining about the constructor, but about being potentially uninitialized).

@kronbichler
Copy link
Member

Do we still want to keep this open? Is there anything we can do?

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

3 participants