Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: src/gallium/auxiliary/util/u_math.h

Issue 216773005: Porting to x64 Android. Remove redefinitions of log2 and log2f. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/mesa
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gallium/auxiliary/util/u_math.h
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index 05bb9e2e0b38a29e8e582c9d7cdb628e29c7a8e9..2383f94e576a52bb0ced28a933c8cd5c1b3ffd20 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -61,46 +61,46 @@ extern "C" {
#endif
-#if defined(_MSC_VER)
+#if defined(_MSC_VER)
#if _MSC_VER < 1400 && !defined(__cplusplus)
-
-static INLINE float cosf( float f )
+
+static INLINE float cosf( float f )
{
return (float) cos( (double) f );
}
-static INLINE float sinf( float f )
+static INLINE float sinf( float f )
{
return (float) sin( (double) f );
}
-static INLINE float ceilf( float f )
+static INLINE float ceilf( float f )
{
return (float) ceil( (double) f );
}
-static INLINE float floorf( float f )
+static INLINE float floorf( float f )
{
return (float) floor( (double) f );
}
-static INLINE float powf( float f, float g )
+static INLINE float powf( float f, float g )
{
return (float) pow( (double) f, (double) g );
}
-static INLINE float sqrtf( float f )
+static INLINE float sqrtf( float f )
{
return (float) sqrt( (double) f );
}
-static INLINE float fabsf( float f )
+static INLINE float fabsf( float f )
{
return (float) fabs( (double) f );
}
-static INLINE float logf( float f )
+static INLINE float logf( float f )
{
return (float) log( (double) f );
}
@@ -140,31 +140,6 @@ roundf(float x)
#endif /* _MSC_VER */
-
-#ifdef PIPE_OS_ANDROID
-
-static INLINE
-double log2(double d)
-{
- return log(d) * (1.0 / M_LN2);
-}
-
-/* workaround a conflict with main/imports.h */
-#ifdef log2f
-#undef log2f
-#endif
-
-static INLINE
-float log2f(float f)
-{
- return logf(f) * (float) (1.0 / M_LN2);
-}
-
-#endif
-
-
-
-
#define POW2_TABLE_SIZE_LOG2 9
#define POW2_TABLE_SIZE (1 << POW2_TABLE_SIZE_LOG2)
#define POW2_TABLE_OFFSET (POW2_TABLE_SIZE/2)
@@ -305,7 +280,7 @@ util_ifloor(float f)
static INLINE int
util_iround(float f)
{
-#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
+#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
int r;
__asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st");
return r;
@@ -502,7 +477,7 @@ static INLINE unsigned util_last_bit(unsigned u)
* int i = u_bit_scan(&mymask);
* ... process element i
* }
- *
+ *
*/
static INLINE int u_bit_scan(unsigned *mask)
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698