[all-commits] [llvm/llvm-project] b4ff89: [libc++][mdspan] Implement layout_left

Christian Trott via All-commits all-commits at lists.llvm.org
Thu Jun 29 13:04:48 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b4ff893877ffe6f80fefd705a9e16a6dcd624851
      https://github.com/llvm/llvm-project/commit/b4ff893877ffe6f80fefd705a9e16a6dcd624851
  Author: Christian Trott <crtrott at sandia.gov>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M libcxx/docs/Status/Cxx23.rst
    M libcxx/include/CMakeLists.txt
    M libcxx/include/__fwd/mdspan.h
    A libcxx/include/__mdspan/layout_left.h
    M libcxx/include/__mdspan/layout_right.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
    A libcxx/test/std/containers/views/mdspan/layout_left/assert.conversion.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/assert.ctor.extents.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/assert.ctor.layout_right.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/assert.index_operator.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/assert.stride.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/comparison.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/ctor.default.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/ctor.extents.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/ctor.layout_right.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/ctor.mapping.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/extents.verify.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/index_operator.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/properties.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/required_span_size.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/static_requirements.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_left/stride.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_right/assert.conversion.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_right/assert.ctor.layout_left.pass.cpp
    A libcxx/test/std/containers/views/mdspan/layout_right/ctor.layout_left.pass.cpp

  Log Message:
  -----------
  [libc++][mdspan] Implement layout_left

This commit implements layout_left in support of C++23 mdspan
(https://wg21.link/p0009). layout_left is a layout mapping policy
whose index mapping corresponds to the memory layout of Fortran arrays.
Thus the left most index has stride-1 access, and the right most index
is associated with the largest stride.

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

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




More information about the All-commits mailing list