OpenKalman
get_mdspan.hpp
Go to the documentation of this file.
1 /* This file is part of OpenKalman, a header-only C++ library for
2  * Kalman filters and other recursive filters.
3  *
4  * Copyright (c) 2025 Christopher Lee Ogden <ogden@gatech.edu>
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0. If a copy of the MPL was not distributed with this
8  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
9  */
10 
16 #ifndef OPENKALMAN_GET_MDSPAN_HPP
17 #define OPENKALMAN_GET_MDSPAN_HPP
18 
23 
24 namespace OpenKalman
25 {
29 #ifdef __cpp_concepts
30  template<indexible T>
31 #else
32  template<typename T, std::enable_if_t<indexible<T>, int> = 0>
33 #endif
34  constexpr auto
35  get_mdspan(T& t)
36  {
38  return stdex::invoke(Traits::get_mdspan, t);
39  }
40 
41 
46  template<typename T, typename Extents, typename LayoutPolicy, typename AccessorPolicy>
47  constexpr auto
49  {
50  return std::move(m);
51  }
52 
53 
54 }
55 
56 #endif
constexpr auto get_mdspan(T &t)
Get the coordinates::pattern_collection associated with indexible object T.
Definition: get_mdspan.hpp:35
Definition: mdspan.hpp:34
The root namespace for OpenKalman.
Definition: basics.hpp:34
Forward declaration of object_traits, which must be defined for all objects used in OpenKalman...
Definition: object_traits.hpp:38
Definition of object_traits for std::mdspan.
Definition of object_traits for std::mdspan.
Definition for indexible.
constexpr auto get_mdspan(stdex::mdspan< T, Extents, LayoutPolicy, AccessorPolicy > m)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: get_mdspan.hpp:48