MGIS 3.1.0
Loading...
Searching...
No Matches
CoalescedMemoryAccessFunctionViewBase.ixx File Reference

File which contains the implementation of the CoalescedMemoryAccessFunctionViewBase class declared in MGIS/Function/CoalescedMemoryAccessFunctionViewBase.hxx. More...

Namespaces

namespace  mgis
 the namespace mgis encloses all the MGIS project.

Functions

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

Detailed Description

File which contains the implementation of the CoalescedMemoryAccessFunctionViewBase class declared in MGIS/Function/CoalescedMemoryAccessFunctionViewBase.hxx.

Author
Thomas Helfer
Date
26/10/2025

Function Documentation

◆ splitArrayIntoScalarFunctionViews() [1/2]

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
Nnumber of components
Spacetype of the space on which the views are defined
Parameters
[in]ctxerror handler used to report the errors
[in]spacespace on which the views are defined
[in]valuesconstant values
Returns
the constant views of the components or an empty optional if the number of values is not equal to N * getSpaceSize(space)

◆ splitArrayIntoScalarFunctionViews() [2/2]

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
Nnumber of components
Spacetype of the space on which the views are defined
Parameters
[in]ctxerror handler used to report the errors
[in]spacespace on which the views are defined
[in]valuesvalues
Returns
the views of the components or an empty optional if the number of values is not equal to N * getSpaceSize(space)