Skip to content

Commit

Permalink
Merge pull request #60 from lanl/mauneyc/new/span_v1
Browse files Browse the repository at this point in the history
Conformant span
  • Loading branch information
Yurlungur authored Oct 16, 2024
2 parents 707ad53 + e37efd7 commit 0e9b649
Show file tree
Hide file tree
Showing 4 changed files with 1,087 additions and 0 deletions.
22 changes: 22 additions & 0 deletions doc/sphinx/src/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,28 @@ not yet ``constexpr``, so even with the "relaxed ``constexpr``" compilation mode
not feature-complete on GPUs. This will change when those member functions become ``constexpr`` in
C++20.


span.hpp


``PortsOfCall::span`` is implements ``std::span`` for C++17 (uses native implmentation in C++20)
as a view over contiguous data. ``span`` may have compile-time static extent, or a dynamic extent.
``span`` provides iterator functions similar to containers.

.. code-block:: cpp
int arr[] = {1, 2, 3};
auto s = span{arr};
for(auto & i : s)
{
i -= 1;
}
``span::subspan`` returns a span over a subrange. Element access uses ``span::operator[]``. For
more information, see `C++ reference page <https://en.cppreference.com/w/cpp/container/span>`_.



static_vector.hpp
^^^^^^^^^^^^^^^^^

Expand Down
Loading

0 comments on commit 0e9b649

Please sign in to comment.