Kokkos: Construct DualView without initialization

Created on 24 Mar 2019  路  3Comments  路  Source: kokkos/kokkos

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

InDevelop enhancement

All 3 comments

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));

@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

Done through #2842

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ibaned picture ibaned  路  3Comments

etphipp picture etphipp  路  5Comments

stanmoore1 picture stanmoore1  路  4Comments

ibaned picture ibaned  路  4Comments

hcedwar picture hcedwar  路  4Comments