<cuda/std/mdspan>#

2026-10-01

2 min read time

Applies to Linux and Windows

This page documents cuda::std::mdspan in libhipcxx, a multidimensional span for non-owning views of contiguous data with C++17 availability and C++26 backports.

Provided functionalities#

  • All features of <mdspan> are made available in C++17 onwards.

  • C++26 std::dims is made available in C++17 onwards.

  • C++26 std::aligned_accessor is made available in C++17 onwards.

Extensions#

  • The C++23 multidimensional operator[] is replaced with operator() in previous C++ standards.

  • Detection of out-of-bounds accesses is available in debug mode.

Restrictions#

On device no exceptions are thrown in case of a bad access.