From bf58adcc2f4d73d55cbc90f6eff0f96fe7d30c45 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 15 May 2019 17:08:11 +0200 Subject: truly inline function as macro to trigger better instruction selection (replace x/2 by x*0.5) --- .../heater_control_heater_control.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/monniaux/lustrev4_lv6-en-2cgc_heater_control') diff --git a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control.c b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control.c index b850598a..b3995c61 100644 --- a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control.c +++ b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control.c @@ -45,10 +45,15 @@ DM_INLINE void Lustre_pre_set(_boolean i1,Lustre_pre_ctx_type* ctx){ } // End of Lustre_pre_set // Step function(s) for Lustre_slash_ctx +#if 0 DM_INLINE void Lustre_slash_step(_real i1,_real i2,_real *out){ *out = (i1 / i2); -} // End of Lustre_slash_step +} +#else +#define Lustre_slash_step(x, y, out) *out = x/y +#endif +// End of Lustre_slash_step // Memory initialisation for heater_control_heater_control_ctx DM_INLINE void heater_control_heater_control_ctx_reset(heater_control_heater_control_ctx_type* ctx){ -- cgit