Type erased form of an extent transform.
More...
#include <rexlib/core/operation/shape_rule/extent_transform.hpp>
|
|
using | apply_function_type = std::size_t(*)(std::size_t) |
| | The mapping of an extent.
|
| |
Type erased form of an extent transform.
Holds the mapping, the fragment naming it in diagnostics, and whether it is the identity.
- See also
- same_extent_transform
◆ extent_transform()
Construct an extent transform.
- Parameters
-
| apply | The mapping. Must not be null. |
| relation | Fragment naming the mapping, for diagnostics. Must not be null and must outlive the transform. |
| identity | Whether the mapping is the identity. |
◆ apply()
| std::size_t rexlib::extent_transform::apply |
( |
std::size_t |
extent | ) |
const |
|
noexcept |
Apply the transform to an extent.
- Parameters
-
| extent | The extent of the variable. |
- Returns
- std::size_t The extent of the axis.
◆ get_relation()
| const char * rexlib::extent_transform::get_relation |
( |
| ) |
const |
|
noexcept |
Get the fragment naming the mapping.
- Returns
- const char* The fragment.
◆ is_identity()
| bool rexlib::extent_transform::is_identity |
( |
| ) |
const |
|
noexcept |
Check whether the transform is the identity.
- Returns
- true The transform maps every extent onto itself.
-
false It does not.
The documentation for this class was generated from the following file: