Daniel Arndt

Results 791 comments of Daniel Arndt

> Instead of storing a Number[dim>0 ? dim : 1] array (to ensure non-zero size), I would like to make this a std::array. This will likely not work on GPUs.

> Hm, but this change already happened in #16474 and it compiled just fine... Hmm... I might try manually for NVIDIA, AMD and Intel GPUs.

> Hmm... I might try manually for NVIDIA, AMD and Intel GPUs. See https://godbolt.org/z/YcePz7T9P for example (basically we need `-expt-relaxed-constexpr` for this to work).

Our CI enforces that flag since it avoids a lot of annoying compiler warnings but its not used by default in `Kokkos` or `nvcc`. It seems to be fine with...

> I don't have any experience with GPUs or any of these compilers. Do we need to roll back all of these patches, or do you think you can finagle...

There is at least [bit_cast](https://en.cppreference.com/w/cpp/numeric/bit_cast) in `C++20` that allows `constexpr` reinterpretations of memory.

The interface for reducers only has `reference()` and `view()`. Any value contained in a reducer would only be copied to the `GPU` but not back. To make that work we...

> I'm not saying it _does_ this, but Kokkos could certainly use `Reducer::init` on the device to create a _new_ reduction accumulator and then copy the result back to the...

> I'm afraid I still don't see what the intended usage pattern is: `memcpy`ing the [`SumMyArray` example reducer](https://kokkos.github.io/kokkos-core-wiki/ProgrammingGuide/Custom-Reductions-Custom-Reducers.html#example) would leave it with a pointer to host memory. Does that example...

Retest this please.