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: accept std::initializer_list #12803

Merged
merged 1 commit into from Oct 12, 2021

Conversation

peterrum
Copy link
Member

@peterrum peterrum commented Oct 8, 2021

Something like this would be nice to be able to write:

const VectorizedArray<double> ls = {1.00, 0.75, 0.50, 0.25};

Any opinions before add it to more VA specializations and a test?

@peterrum peterrum added the SIMD label Oct 8, 2021
@kronbichler
Copy link
Member

I think this is nice, especially since missing entries are filled up with zeros for the case we switch architectures (to the extent the number of entries in the initializer list does not exceed the capacity).

@peterrum
Copy link
Member Author

peterrum commented Oct 8, 2021

OK! Then I proceed here!

@peterrum peterrum changed the title [WIP] VectorizedArray: accept std::initializer_list VectorizedArray: accept std::initializer_list Oct 8, 2021
@peterrum
Copy link
Member Author

peterrum commented Oct 8, 2021

Ready from my side :)

@@ -0,0 +1,3 @@
New: VectorizedArray can now constructed from an initializer list.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
New: VectorizedArray can now constructed from an initializer list.
New: VectorizedArray can now be constructed from an initializer list.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

@kronbichler
Copy link
Member

/rebuild

@kronbichler
Copy link
Member

The test failure is spurious. Merging.

@kronbichler kronbichler merged commit df27c7c into dealii:master Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants