Closed WeiqunZhang closed 3 months ago
Looks good! I think constexpr
should be added to the functions. Possibly also AMREX_GPU_HOST_DEVICE
but that would only make sense if it would return an amrex::GpuArray
instead of std::array
.
Yes, constexpr
should be added. As for having it return GpuArray, I thought about it, but wasn't entirely sure if we should do it. Thinking about it again, there is probably not much downside.
Add a utility function that can convert an amrex::GpuTuple whose types are the same to an array.