Kokkos: Question: how to declare and initialize a scalar (zero-dimensional) DualView?

Created on 11 Apr 2018  路  4Comments  路  Source: kokkos/kokkos

As in the subject, I can't find this in the documentation. Can anyone provide an example? I know I can do DualView

question

All 4 comments

@Char-Aznable does something go wrong if you just try DualView<int> ?

Yes, use DualView<int> as @ibaned suggested, and remember that you still have to use () for accessing the value, even though the parentheses are empty.

@stanmoore1 I didn't know I can call () without argument. I guess it's something like this?

DualView<int> a("a");
a.h_view() = 1;

Yeah that should be correct.

Was this page helpful?
0 / 5 - 0 ratings