From 6363d21d6bfd60564830c410ea75f96b3bc1f129 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Sun, 8 Apr 2018 16:46:22 -0600 Subject: Optimizations because vc++ is dumb --- src/survive_reproject.generated.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/survive_reproject.generated.h b/src/survive_reproject.generated.h index f4b499a..e184775 100644 --- a/src/survive_reproject.generated.h +++ b/src/survive_reproject.generated.h @@ -22,11 +22,11 @@ static inline void gen_reproject_jac_obj_p(FLT* out, const FLT *obj, const FLT * FLT x1 = lh_qi*lh_qj; FLT x2 = lh_qk*lh_qw; FLT x3 = x1 - x2; - FLT x4 = pow(lh_qi, 2); - FLT x5 = pow(lh_qj, 2); + FLT x4 = (lh_qi * lh_qi); + FLT x5 = (lh_qj * lh_qj); FLT x6 = x4 + x5; - FLT x7 = pow(lh_qk, 2); - FLT x8 = sqrt(pow(lh_qw, 2) + x6 + x7); + FLT x7 = (lh_qk * lh_qk); + FLT x8 = sqrt((lh_qw * lh_qw) + x6 + x7); FLT x9 = lh_qi*lh_qk; FLT x10 = lh_qj*lh_qw; FLT x11 = x10 + x9; @@ -40,11 +40,11 @@ static inline void gen_reproject_jac_obj_p(FLT* out, const FLT *obj, const FLT * FLT x19 = obj_qi*obj_qk; FLT x20 = obj_qj*obj_qw; FLT x21 = sensor_z*(x19 + x20); - FLT x22 = pow(obj_qi, 2); - FLT x23 = pow(obj_qj, 2); + FLT x22 = (obj_qi * obj_qi); + FLT x23 = (obj_qj * obj_qj); FLT x24 = x22 + x23; - FLT x25 = pow(obj_qk, 2); - FLT x26 = sqrt(pow(obj_qw, 2) + x24 + x25); + FLT x25 = (obj_qk * obj_qk); + FLT x26 = sqrt((obj_qw * obj_qw) + x24 + x25); FLT x27 = 2*x26; FLT x28 = obj_qi*obj_qj; FLT x29 = obj_qk*obj_qw; @@ -70,18 +70,18 @@ static inline void gen_reproject_jac_obj_p(FLT* out, const FLT *obj, const FLT * FLT x49 = x17*(x4 + x7) - 1; FLT x50 = 2*x43*x8; FLT x51 = lh_py*x49 - x12*x3 + x3*x33 - x39*x49 - x47*x48 + x47*x50; - FLT x52 = pow(x44, -2); + FLT x52 = 1. / (x44 * x44); FLT x53 = 4*curve_0*curve_scale*x51*x52*x8; FLT x54 = x11*x52; - FLT x55 = pow(x51, 2); + FLT x55 = (x51*x51); FLT x56 = curve_0*x55; - FLT x57 = pow(x44, -3); + FLT x57 = 1. / (x44*x44*x44); FLT x58 = 4*curve_scale*x11*x57*x8; FLT x59 = x1 + x2; FLT x60 = -x10 + x9; FLT x61 = x17*(x5 + x7) - 1; FLT x62 = lh_px*x61 - x16*x59 - x32*x61 + x40*x59 - x48*x60 + x50*x60; - FLT x63 = pow(x62, 2); + FLT x63 = (x62 * x62); FLT x64 = 1.0/(x52*x63 + 1); FLT x65 = x45*x61; FLT x66 = 2*x54*x62*x8; -- cgit v1.2.3