Mdspan

Mdspan#

2026-10-23

1 min read time

Applies to Linux and Windows

This page covers the mdspan extended API, providing memory space aware accessors and mdspan aliases, the layout_stride_relaxed layout, the restrict aliasing policy, and conversions between mdspan and DLPack.

Header

Content

libhipcxx Availability

host/device/managed mdspan and accessor

Host, device, and managed memory space mdspan and accessors

libhipcxx 3.0

layout_stride_relaxed

Layout mapping policy with negative/zero strides and offset support

libhipcxx 3.0

restrict mdspan and accessor

mdspan and accessor with the restrict aliasing policy

libhipcxx 3.0

shared_memory mdspan and accessor

mdspan and accessor for shared memory

libhipcxx 3.4

mdspan to dlpack

Convert a mdspan to a DLTensor

libhipcxx 3.4

dlpack to mdspan

Convert a DLTensor to a mdspan

libhipcxx 3.4