File which defines a base class for views whose components are stored contiguously in separate memory regions, each component being described by a scalar function view.
More...
|
| template<size_type N, typename Space> |
| constexpr std::optional< std::array< FunctionView< Space, FunctionDataLayoutDescription{.data_size=1,.data_stride=1}>, N > > | mgis::function::splitArrayIntoScalarFunctionViews (AbstractErrorHandler &, const Space &, std::span< real >) |
| | split an array of values into N mutable scalar function views, each of them being defined on the given space
|
| template<size_type N, typename Space> |
| constexpr std::optional< std::array< FunctionView< Space, FunctionDataLayoutDescription{.data_size=1,.data_stride=1}, false >, N > > | mgis::function::splitArrayIntoScalarFunctionViews (AbstractErrorHandler &, const Space &, std::span< const real >) |
| | split an array of values into N constant scalar function views, each of them being defined on the given space
|
File which defines a base class for views whose components are stored contiguously in separate memory regions, each component being described by a scalar function view.
- Author
- Thomas Helfer
- Date
- 26/10/2025
- Copyright
- (C) Copyright Thomas Helfer 2018. Use, modification and distribution are subject to one of the following licences:
- GNU Lesser General Public License (LGPL), Version 3.0. (See accompanying file LGPL-3.0.txt)
- CECILL-C, Version 1.0 (See accompanying files CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt).
template<size_type N, typename Space>
| std::optional< std::array< FunctionView< Space, FunctionDataLayoutDescription{.data_size=1,.data_stride=1}, false >, N > > mgis::function::splitArrayIntoScalarFunctionViews |
( |
AbstractErrorHandler & | ctx, |
|
|
const Space & | space, |
|
|
std::span< const real > | values ) |
|
constexpr |
split an array of values into N constant scalar function views, each of them being defined on the given space
The values of the k-th component are stored in values.subspan(k * getSpaceSize(space), getSpaceSize(space)), i.e. each component is stored contiguously and the components are not interleaved.
- Template Parameters
-
| N | number of components |
| Space | type of the space on which the views are defined |
- Parameters
-
| [in] | ctx | error handler used to report the errors |
| [in] | space | space on which the views are defined |
| [in] | values | constant values |
- Returns
- the constant views of the components or an empty optional if the number of values is not equal to N * getSpaceSize(space)
template<size_type N, typename Space>
| std::optional< std::array< FunctionView< Space, FunctionDataLayoutDescription{.data_size=1,.data_stride=1}>, N > > mgis::function::splitArrayIntoScalarFunctionViews |
( |
AbstractErrorHandler & | ctx, |
|
|
const Space & | space, |
|
|
std::span< real > | values ) |
|
constexpr |
split an array of values into N mutable scalar function views, each of them being defined on the given space
The values of the k-th component are stored in values.subspan(k * getSpaceSize(space), getSpaceSize(space)), i.e. each component is stored contiguously and the components are not interleaved.
- Template Parameters
-
| N | number of components |
| Space | type of the space on which the views are defined |
- Parameters
-
| [in] | ctx | error handler used to report the errors |
| [in] | space | space on which the views are defined |
| [in] | values | values |
- Returns
- the views of the components or an empty optional if the number of values is not equal to N * getSpaceSize(space)