Commit 462990a9 authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

core: remove old dispatch function

parent 3cd37d83
......@@ -5514,230 +5514,6 @@ struct simulation
std::as_const(*this).static_dispatch<Dynamics>());
}
template<typename Function>
constexpr status dispatch(const dynamics_type type, Function f) noexcept
{
switch (type) {
case dynamics_type::none:
return f(none_models);
case dynamics_type::qss1_integrator:
return f(qss1_integrator_models);
case dynamics_type::qss1_multiplier:
return f(qss1_multiplier_models);
case dynamics_type::qss1_cross:
return f(qss1_cross_models);
case dynamics_type::qss1_power:
return f(qss1_power_models);
case dynamics_type::qss1_square:
return f(qss1_square_models);
case dynamics_type::qss1_sum_2:
return f(qss1_sum_2_models);
case dynamics_type::qss1_sum_3:
return f(qss1_sum_3_models);
case dynamics_type::qss1_sum_4:
return f(qss1_sum_4_models);
case dynamics_type::qss1_wsum_2:
return f(qss1_wsum_2_models);
case dynamics_type::qss1_wsum_3:
return f(qss1_wsum_3_models);
case dynamics_type::qss1_wsum_4:
return f(qss1_wsum_4_models);
case dynamics_type::qss2_integrator:
return f(qss2_integrator_models);
case dynamics_type::qss2_multiplier:
return f(qss2_multiplier_models);
case dynamics_type::qss2_cross:
return f(qss2_cross_models);
case dynamics_type::qss2_power:
return f(qss2_power_models);
case dynamics_type::qss2_square:
return f(qss2_square_models);
case dynamics_type::qss2_sum_2:
return f(qss2_sum_2_models);
case dynamics_type::qss2_sum_3:
return f(qss2_sum_3_models);
case dynamics_type::qss2_sum_4:
return f(qss2_sum_4_models);
case dynamics_type::qss2_wsum_2:
return f(qss2_wsum_2_models);
case dynamics_type::qss2_wsum_3:
return f(qss2_wsum_3_models);
case dynamics_type::qss2_wsum_4:
return f(qss2_wsum_4_models);
case dynamics_type::qss3_integrator:
return f(qss3_integrator_models);
case dynamics_type::qss3_multiplier:
return f(qss3_multiplier_models);
case dynamics_type::qss3_cross:
return f(qss3_cross_models);
case dynamics_type::qss3_power:
return f(qss3_power_models);
case dynamics_type::qss3_square:
return f(qss3_square_models);
case dynamics_type::qss3_sum_2:
return f(qss3_sum_2_models);
case dynamics_type::qss3_sum_3:
return f(qss3_sum_3_models);
case dynamics_type::qss3_sum_4:
return f(qss3_sum_4_models);
case dynamics_type::qss3_wsum_2:
return f(qss3_wsum_2_models);
case dynamics_type::qss3_wsum_3:
return f(qss3_wsum_3_models);
case dynamics_type::qss3_wsum_4:
return f(qss3_wsum_4_models);
case dynamics_type::integrator:
return f(integrator_models);
case dynamics_type::quantifier:
return f(quantifier_models);
case dynamics_type::adder_2:
return f(adder_2_models);
case dynamics_type::adder_3:
return f(adder_3_models);
case dynamics_type::adder_4:
return f(adder_4_models);
case dynamics_type::mult_2:
return f(mult_2_models);
case dynamics_type::mult_3:
return f(mult_3_models);
case dynamics_type::mult_4:
return f(mult_4_models);
case dynamics_type::counter:
return f(counter_models);
case dynamics_type::generator:
return f(generator_models);
case dynamics_type::constant:
return f(constant_models);
case dynamics_type::cross:
return f(cross_models);
case dynamics_type::accumulator_2:
return f(accumulator_2_models);
case dynamics_type::time_func:
return f(time_func_models);
case dynamics_type::flow:
return f(flow_models);
}
irt_unreachable();
}
template<typename Function>
constexpr status dispatch(const dynamics_type type,
Function f) const noexcept
{
switch (type) {
case dynamics_type::none:
return f(none_models);
case dynamics_type::qss1_integrator:
return f(qss1_integrator_models);
case dynamics_type::qss1_multiplier:
return f(qss1_multiplier_models);
case dynamics_type::qss1_cross:
return f(qss1_cross_models);
case dynamics_type::qss1_power:
return f(qss1_power_models);
case dynamics_type::qss1_square:
return f(qss1_square_models);
case dynamics_type::qss1_sum_2:
return f(qss1_sum_2_models);
case dynamics_type::qss1_sum_3:
return f(qss1_sum_3_models);
case dynamics_type::qss1_sum_4:
return f(qss1_sum_4_models);
case dynamics_type::qss1_wsum_2:
return f(qss1_wsum_2_models);
case dynamics_type::qss1_wsum_3:
return f(qss1_wsum_3_models);
case dynamics_type::qss1_wsum_4:
return f(qss1_wsum_4_models);
case dynamics_type::qss2_integrator:
return f(qss2_integrator_models);
case dynamics_type::qss2_multiplier:
return f(qss2_multiplier_models);
case dynamics_type::qss2_cross:
return f(qss2_cross_models);
case dynamics_type::qss2_power:
return f(qss2_power_models);
case dynamics_type::qss2_square:
return f(qss2_square_models);
case dynamics_type::qss2_sum_2:
return f(qss2_sum_2_models);
case dynamics_type::qss2_sum_3:
return f(qss2_sum_3_models);
case dynamics_type::qss2_sum_4:
return f(qss2_sum_4_models);
case dynamics_type::qss2_wsum_2:
return f(qss2_wsum_2_models);
case dynamics_type::qss2_wsum_3:
return f(qss2_wsum_3_models);
case dynamics_type::qss2_wsum_4:
return f(qss2_wsum_4_models);
case dynamics_type::qss3_integrator:
return f(qss3_integrator_models);
case dynamics_type::qss3_multiplier:
return f(qss3_multiplier_models);
case dynamics_type::qss3_cross:
return f(qss3_cross_models);
case dynamics_type::qss3_power:
return f(qss3_power_models);
case dynamics_type::qss3_square:
return f(qss3_square_models);
case dynamics_type::qss3_sum_2:
return f(qss3_sum_2_models);
case dynamics_type::qss3_sum_3:
return f(qss3_sum_3_models);
case dynamics_type::qss3_sum_4:
return f(qss3_sum_4_models);
case dynamics_type::qss3_wsum_2:
return f(qss3_wsum_2_models);
case dynamics_type::qss3_wsum_3:
return f(qss3_wsum_3_models);
case dynamics_type::qss3_wsum_4:
return f(qss3_wsum_4_models);
case dynamics_type::integrator:
return f(integrator_models);
case dynamics_type::quantifier:
return f(quantifier_models);
case dynamics_type::adder_2:
return f(adder_2_models);
case dynamics_type::adder_3:
return f(adder_3_models);
case dynamics_type::adder_4:
return f(adder_4_models);
case dynamics_type::mult_2:
return f(mult_2_models);
case dynamics_type::mult_3:
return f(mult_3_models);
case dynamics_type::mult_4:
return f(mult_4_models);
case dynamics_type::counter:
return f(counter_models);
case dynamics_type::generator:
return f(generator_models);
case dynamics_type::constant:
return f(constant_models);
case dynamics_type::cross:
return f(cross_models);
case dynamics_type::accumulator_2:
return f(accumulator_2_models);
case dynamics_type::time_func:
return f(time_func_models);
case dynamics_type::flow:
return f(flow_models);
}
irt_unreachable();
}
template<typename Function, typename... Args>
constexpr auto dispatch_2(const dynamics_type type,
Function&& f,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment