rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
rexlib::shape_rule_accessors< Rule > Struct Template Reference

Read the values a shape rule depends on from the parameters of an operation instance. More...

#include <rexlib/core/operation/shape_rule/shape_rule_accessors.hpp>

Public Types

using operation_extent_list_type = typename detail::operation_extent_list< typename Rule::pivot_list_type >::type
 
using operation_extent_array_type = std::array< std::size_t, operation_extent_count >
 

Static Public Member Functions

template<typename Parameters >
static span< const std::size_t > get_named_axes (const Parameters &parameters) noexcept
 Read the axes the core axes lie along.
 
template<typename Parameters >
static bool get_keep_dimensions (const Parameters &parameters) noexcept
 Read whether an output without core axes keeps the named ones.
 
template<typename Parameters >
static operation_extent_array_type get_operation_extents (const Parameters &parameters) noexcept
 Read every extent the operation supplies, whether its instance supplies it or its declaration fixes it.
 

Static Public Attributes

static REXLIB_CONST_CONSTEXPR std::size_t operation_extent_count
 

Detailed Description

template<typename Rule>
struct rexlib::shape_rule_accessors< Rule >

Read the values a shape rule depends on from the parameters of an operation instance.

Evaluates the accessors the rule names, so that the values can be handed to a shape_rule_interpreter, which knows nothing of parameter types.

Template Parameters
RuleThe operand_shape_rule.

Member Function Documentation

◆ get_keep_dimensions()

template<typename Rule >
template<typename Parameters >
static bool rexlib::shape_rule_accessors< Rule >::get_keep_dimensions ( const Parameters &  parameters)
staticnoexcept

Read whether an output without core axes keeps the named ones.

Template Parameters
ParametersThe parameter type of the operation.
Parameters
parametersThe parameters of the operation instance.
Returns
bool What the keep accessor reads, or false when the rule names none.

◆ get_named_axes()

template<typename Rule >
template<typename Parameters >
static span< const std::size_t > rexlib::shape_rule_accessors< Rule >::get_named_axes ( const Parameters &  parameters)
staticnoexcept

Read the axes the core axes lie along.

Template Parameters
ParametersThe parameter type of the operation.
Parameters
parametersThe parameters of the operation instance.
Returns
span<const std::size_t> The axes, or none when the rule places the core axes last.

◆ get_operation_extents()

template<typename Rule >
template<typename Parameters >
static operation_extent_array_type rexlib::shape_rule_accessors< Rule >::get_operation_extents ( const Parameters &  parameters)
staticnoexcept

Read every extent the operation supplies, whether its instance supplies it or its declaration fixes it.

Template Parameters
ParametersThe parameter type of the operation.
Parameters
parametersThe parameters of the operation instance.
Returns
operation_extent_array_type The extents, in the order their variables are declared.

Member Data Documentation

◆ operation_extent_count

template<typename Rule >
REXLIB_CONST_CONSTEXPR std::size_t rexlib::shape_rule_accessors< Rule >::operation_extent_count
static
Initial value:
=
type_list_size<operation_extent_list_type>::value

The documentation for this struct was generated from the following file: