From d122318bef2ff0eced7641dc24f411f792bd2935 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Jul 2013 00:55:17 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console added percentage/ratio units added auto-range and auto tick calculation to stat bar to automate display stats --- indra/llmath/llmath.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llmath/llmath.h') diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index b93f89d674..cad2461e9c 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -75,6 +75,8 @@ const F32 OO_SQRT2 = 0.7071067811865475244008443621049f; const F32 DEG_TO_RAD = 0.017453292519943295769236907684886f; const F32 RAD_TO_DEG = 57.295779513082320876798154814105f; const F32 F_APPROXIMATELY_ZERO = 0.00001f; +const F32 F_LN10 = 2.3025850929940456840179914546844f; +const F32 OO_LN10 = 0.43429448190325182765112891891661; const F32 F_LN2 = 0.69314718056f; const F32 OO_LN2 = 1.4426950408889634073599246810019f; -- cgit v1.2.3 From 50c472c24216ad0c3890cb8bb9cf638e75642f0c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 23 Jul 2013 18:47:16 -0700 Subject: renamed mVarianceSum to mSumOfSquares to be more clear fixed normalization assertions to work with megaprims added is_zero() utility function fixed unit declarations to be more clear fixed texture cache hit rate always being 0 --- indra/llmath/llmath.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llmath/llmath.h') diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index cad2461e9c..eeb5cd3ee6 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -113,6 +113,12 @@ inline bool is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f < // WARNING: Infinity is comparable with F32_MAX and negative // infinity is comparable with F32_MIN +// handles negative and positive zeros +inline bool is_zero(F32 x) +{ + return (*(U32*)(&x) & 0x7fffffff) == 0; +} + inline bool is_approx_equal(F32 x, F32 y) { const S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02; -- cgit v1.2.3 From 8d3daa141e9ea14f533559843d77ab5c0f715421 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 16:14:19 -0700 Subject: SH-4374 FIX Interesting: Statistics Object cache hit rate is always 100% moved object cache sampling code so that it actually gets executed default values for stats are NaN instead of 0 in many cases --- indra/llmath/llmath.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llmath/llmath.h') diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index eeb5cd3ee6..2f83836501 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -83,6 +83,10 @@ const F32 OO_LN2 = 1.4426950408889634073599246810019f; const F32 F_ALMOST_ZERO = 0.0001f; const F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO; +const F64 NaN = std::numeric_limits::quiet_NaN(); +const F64 INFINITY = std::numeric_limits::infinity(); +const F64 MINUS_INFINITY = std::numeric_limits::infinity() * -1.0; + // BUG: Eliminate in favor of F_APPROXIMATELY_ZERO above? const F32 FP_MAG_THRESHOLD = 0.0000001f; -- cgit v1.2.3 From 26581404e426b00cd0a07c38b5cb858d5d5faa28 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Aug 2013 11:51:49 -0700 Subject: BUILDFIX: added header for numeric_limits support on gcc added convenience types for units F32Seconds, etc. --- indra/llmath/llmath.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llmath/llmath.h') diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 2f83836501..fc30feaf80 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -30,6 +30,7 @@ #include #include #include +#include #include "lldefs.h" //#include "llstl.h" // *TODO: Remove when LLString is gone //#include "llstring.h" // *TODO: Remove when LLString is gone -- cgit v1.2.3 From d2bd23fdd0cb7f63eec4c32e9f530b7f33c4431c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Aug 2013 17:02:01 -0700 Subject: BUILDFIX: removed problematic constants for linux build --- indra/llmath/llmath.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/llmath/llmath.h') diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index fc30feaf80..29db799154 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -84,10 +84,6 @@ const F32 OO_LN2 = 1.4426950408889634073599246810019f; const F32 F_ALMOST_ZERO = 0.0001f; const F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO; -const F64 NaN = std::numeric_limits::quiet_NaN(); -const F64 INFINITY = std::numeric_limits::infinity(); -const F64 MINUS_INFINITY = std::numeric_limits::infinity() * -1.0; - // BUG: Eliminate in favor of F_APPROXIMATELY_ZERO above? const F32 FP_MAG_THRESHOLD = 0.0000001f; -- cgit v1.2.3