Closed youyu3 closed 2 years ago
@crtrott We had an offline discussion about whether to use MDSPAN_INLINE_FUNCTION
instead of _MDSPAN_HOST_DEVICE
. We concluded that using _MDSPAN_HOST_DEVICE
is fine, for the following reasons.
dispatch
).inline
keyword. It's generally desirable to have a way to spell __host__ __device__
without saying inline
as well.Given (2), I'll file an issue to rename _MDSPAN_HOST_DEVICE
to MDSPAN_HOST_DEVICE
, so that tests and examples can feel more confident to use it. It's not necessarily good to force the implementation to mix inline
with __host__ __device__
, because inline
changes ODR semantics. For a header-only library, this doesn't matter quite so much, but users might pick up on the habit.
layout_{left|right}
as_MDSPAN_HOST_DEVICE
to avoid compile-time warning messages when built with nvcc without the--expt-relaxed-constexpr
flagFixes #175 .