a base class to compare indexing policies which provide default implementations.
More...
#include </home/runner/work/tfel/tfel/include/TFEL/Math/Array/IndexingPolicies.hxx>
template<typename IndexingPolicy1, typename IndexingPolicy2>
struct tfel::math::IndexingPoliciesCompatiblityCheckBase< IndexingPolicy1, IndexingPolicy2 >
a base class to compare indexing policies which provide default implementations.
- Template Parameters
-
| IndexingPolicy1 | first indexing policy |
| IndexingPolicy2 | second indexing policy |
- Note
- the default implementations are very conservative. For example, the memory layout are reported to be different by default.
◆ haveTheSameMemoryLayout()
template<typename IndexingPolicy1, typename IndexingPolicy2>
- Returns
- if the indexing policies have the same memory layouts.
Two indexing policies can be compatible (at compile-time and at runtime), i.e. one may transfer data from one indexing policy to another, but the memory layout of the data may differ. For example, one may assign a matrix stored in column-major format to a matrix having a row-major format.
◆ performCompileTimeCheck()
template<typename IndexingPolicy1, typename IndexingPolicy2>
- Returns
- if the given indexing policies may a priori be compatible.
◆ performRuntimeTimeCheck()
template<typename IndexingPolicy1, typename IndexingPolicy2>
- Returns
- if the given policies are compatible at runtime time.
- Precondition
- this method is only meaningful if the compileTimeCheck method returns true.
- Parameters
-
| [in] | p1 | first indexing policy |
| [in] | p2 | second indexing policy |
- Note
- This methods does nothing if both indexing policies have fixed size (i.e. known at compile-time).
The documentation for this struct was generated from the following files: