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

Construct DualView without initialization #2046

Closed
Char-Aznable opened this issue Mar 24, 2019 · 3 comments
Closed

Construct DualView without initialization #2046

Char-Aznable opened this issue Mar 24, 2019 · 3 comments
Assignees
Labels
Enhancement Improve existing capability; will potentially require voting

Comments

@Char-Aznable
Copy link
Contributor

There should be a way of doing this because we can do it for either side of the DualView

@crtrott crtrott added the Enhancement Improve existing capability; will potentially require voting label Mar 24, 2019
@crtrott
Copy link
Member

crtrott commented Mar 24, 2019

You can currently work around that by constructing a DualView from its two nested views. But yes the more advanced constructors of view should be added.

Workaround:

typedef DualView<double*> view_type;
view_type a(view_type::t_dev(ViewAllocateWithoutInitializing("Label"),N),
            view_type::t_host(ViewAllocateWithoutInitializing("Label"),N));

@mhoemmen
Copy link
Contributor

@Char-Aznable You may find this Tpetra example helpful. It creates a DualView, optionally without initialization.

https://github.com/trilinos/Trilinos/blob/a04a0956dd4354e0bdae2317f538c411e9a49c23/packages/tpetra/core/src/Tpetra_MultiVector_def.hpp#L142

@vqd8a vqd8a added this to the 3.0 Release milestone Aug 28, 2019
@vqd8a vqd8a modified the milestones: 3.0 Release, Tentative 3.1 Release Sep 4, 2019
@crtrott
Copy link
Member

crtrott commented Mar 11, 2020

Done through #2842

@crtrott crtrott closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve existing capability; will potentially require voting
Projects
None yet
Development

No branches or pull requests

4 participants