[all-commits] [llvm/llvm-project] ab863b: [libc++][mdspan] Implement std::mdspan class

Christian Trott via All-commits all-commits at lists.llvm.org
Wed Jul 26 10:31:00 PDT 2023


  Branch: refs/heads/release/17.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ab863b3e73372e983ff5fb658b4bcb6577c87471
      https://github.com/llvm/llvm-project/commit/ab863b3e73372e983ff5fb658b4bcb6577c87471
  Author: Christian Trott <crtrott at sandia.gov>
  Date:   2023-07-26 (Wed, 26 Jul 2023)

  Changed paths:
    M libcxx/docs/ReleaseNotes/17.rst
    M libcxx/include/CMakeLists.txt
    M libcxx/include/__mdspan/extents.h
    M libcxx/include/__mdspan/layout_left.h
    M libcxx/include/__mdspan/layout_right.h
    A libcxx/include/__mdspan/mdspan.h
    M libcxx/include/mdspan
    M libcxx/include/module.modulemap.in
    M libcxx/modules/std/mdspan.cppm
    M libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h
    M libcxx/test/std/containers/views/mdspan/extents/assert.obs.pass.cpp
    M libcxx/test/std/containers/views/mdspan/extents/ctor_from_array.pass.cpp
    M libcxx/test/std/containers/views/mdspan/extents/ctor_from_span.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_left/assert.ctor.extents.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_left/assert.index_operator.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_left/assert.stride.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_right/assert.ctor.extents.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_right/assert.index_operator.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_right/assert.stride.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h
    A libcxx/test/std/containers/views/mdspan/mdspan/CustomTestLayouts.h
    A libcxx/test/std/containers/views/mdspan/mdspan/assert.conversion.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/assert.index_operator.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/assert.size.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/assign.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/conversion.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/conversion.verify.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/ctor.copy.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/ctor.default.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_array.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_extents.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_integers.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_map.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_map_acc.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_span.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/ctor.move.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/deduction.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/element_type.verify.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/extents.verify.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/index_operator.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/mapping.verify.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/move.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/properties.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/swap.pass.cpp
    A libcxx/test/std/containers/views/mdspan/mdspan/types.pass.cpp

  Log Message:
  -----------
  [libc++][mdspan] Implement std::mdspan class

This implements P0009 std::mdspan ((https://wg21.link/p0009)),
a multidimensional span with customization points for
layouts and data access.

Co-authored-by: Damien L-G <dalg24 at gmail.com>

Differential Revision: https://reviews.llvm.org/154367


  Commit: 9957225e7d6761d7e550561eac1df78e5e2c184b
      https://github.com/llvm/llvm-project/commit/9957225e7d6761d7e550561eac1df78e5e2c184b
  Author: Christian Trott <crtrott at sandia.gov>
  Date:   2023-07-26 (Wed, 26 Jul 2023)

  Changed paths:
    M libcxx/include/__mdspan/extents.h
    M libcxx/include/__mdspan/layout_left.h
    M libcxx/include/__mdspan/layout_right.h
    M libcxx/include/__mdspan/mdspan.h
    A libcxx/test/libcxx/containers/views/mdspan/extents/assert.conversion.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_array.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_integral.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/extents/assert.obs.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.conversion.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.extents.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_right.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.index_operator.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.stride.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.conversion.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.extents.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_left.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.index_operator.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.stride.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.conversion.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.index_operator.pass.cpp
    A libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.size.pass.cpp
    R libcxx/test/std/containers/views/mdspan/extents/assert.conversion.pass.cpp
    R libcxx/test/std/containers/views/mdspan/extents/assert.ctor_from_array.pass.cpp
    R libcxx/test/std/containers/views/mdspan/extents/assert.ctor_from_integral.pass.cpp
    R libcxx/test/std/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp
    R libcxx/test/std/containers/views/mdspan/extents/assert.obs.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_left/assert.conversion.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_left/assert.ctor.extents.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_left/assert.ctor.layout_right.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_left/assert.index_operator.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_left/assert.stride.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_right/assert.conversion.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_right/assert.ctor.extents.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_right/assert.ctor.layout_left.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_right/assert.index_operator.pass.cpp
    R libcxx/test/std/containers/views/mdspan/layout_right/assert.stride.pass.cpp
    R libcxx/test/std/containers/views/mdspan/mdspan/assert.conversion.pass.cpp
    R libcxx/test/std/containers/views/mdspan/mdspan/assert.index_operator.pass.cpp
    R libcxx/test/std/containers/views/mdspan/mdspan/assert.size.pass.cpp

  Log Message:
  -----------
  [libc++][mdspan] Fix uglification, categorize asserts and move tests

Fixes uglification in mdspan deduction guides, which CI
did not test for until recently. The CI modification
and mdspan testing overlapped, so mdspan landed with green
CI, and the CI modification landed too.

Make most assertions in mdspan and its helper classes
trigger during a hardened build in order to catch
out of bounds access errors.

Also moves all mdspan assertions tests from libcxx/test/std
to libcxx/test/libcxx.

Differential Revision: https://reviews.llvm.org/156181


Compare: https://github.com/llvm/llvm-project/compare/397390a65b8d...9957225e7d67


More information about the All-commits mailing list