* added math.h missing prototypes like log2f. This fixes #6802.
* whitespace cleanup and renamed log2() to radeon_log2 (conflicts with log2 in math.h) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39620 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+16
-14
@@ -117,6 +117,7 @@ extern long long llrintf(float x);
|
||||
extern long long llroundf(float x);
|
||||
extern float log10f(float x);
|
||||
extern float log1pf(float x);
|
||||
extern float log2f(float x);
|
||||
extern float logbf(float x);
|
||||
extern float logf(float x);
|
||||
extern long lrintf(float x);
|
||||
@@ -124,8 +125,12 @@ extern long lroundf(float x);
|
||||
extern float modff(float x, float *y);
|
||||
extern float nanf(const char *tagp);
|
||||
extern float nearbyintf(float x);
|
||||
extern float nextafterf(float x, float y);
|
||||
extern float nexttowardf(float x, long double y);
|
||||
extern float powf(float x, float y);
|
||||
extern float remainderf(float x, float y);
|
||||
extern float remquof(float x, float y, int *quo);
|
||||
extern float rintf(float x);
|
||||
extern float roundf(float x);
|
||||
extern float sinf(float x);
|
||||
extern float sinhf(float x);
|
||||
@@ -160,13 +165,20 @@ extern long long llrint(double x);
|
||||
extern long long llround(double x);
|
||||
extern double log(double x);
|
||||
extern double log10(double x);
|
||||
extern double log1p(double x);
|
||||
extern double log2(double x);
|
||||
extern double logb(double x);
|
||||
extern long lrint(double x);
|
||||
extern long lround(double x);
|
||||
extern double modf(double x, double *y);
|
||||
extern double nan(const char* tagp);
|
||||
extern double nearbyint(double x);
|
||||
extern double nextafter(double x, double y);
|
||||
extern double nexttoward(double x, long double y);
|
||||
extern double pow(double x, double y);
|
||||
extern double remainder(double x, double y);
|
||||
extern double remquo(double x, double y, int *quo);
|
||||
extern double rint(double x);
|
||||
extern double round(double x);
|
||||
extern double sin(double x);
|
||||
extern double sinh(double x);
|
||||
@@ -202,8 +214,12 @@ extern long lroundl(long double x);
|
||||
extern long double modfl(long double value, long double *iptr);
|
||||
extern long double nanl(const char* tagp);
|
||||
extern long double nearbyintl(long double x);
|
||||
extern long double nextafterl(long double x, long double y);
|
||||
extern long double nexttowardl(long double x, long double y);
|
||||
extern long double powl(long double x, long double y);
|
||||
extern long double remainderl(long double x, long double y);
|
||||
extern long double remquol(long double x, long double y, int *quo);
|
||||
extern long double rintl(long double x);
|
||||
extern long double roundl(long double x);
|
||||
extern long double sinl(long double x);
|
||||
extern long double sinhl(long double x);
|
||||
@@ -224,12 +240,6 @@ extern double j0(double x);
|
||||
extern double j1(double x);
|
||||
extern double jn(int x, double y);
|
||||
extern double lgamma_r(double x, int *y);
|
||||
extern double log1p(double x);
|
||||
extern double logb(double x);
|
||||
extern double nextafter(double x, double y);
|
||||
extern double nexttoward(double x, long double y);
|
||||
extern double remainder(double x, double y);
|
||||
extern double rint(double x);
|
||||
extern double scalb (double x, double y);
|
||||
extern double y0(double x);
|
||||
extern double y1(double x);
|
||||
@@ -258,20 +268,12 @@ extern float erff(float x);
|
||||
extern float erfcf(float x);
|
||||
extern float gammaf_r(float x, int *y);
|
||||
extern float lgammaf_r(float x, int *y);
|
||||
extern float rintf(float x);
|
||||
extern float nextafterf(float x, float y);
|
||||
extern float nexttowardf(float x, long double y);
|
||||
extern float remainderf(float x, float y);
|
||||
extern float scalbf(float x, float n);
|
||||
extern float scalbnf(float x, int n);
|
||||
extern int ilogbf(float x);
|
||||
|
||||
extern long double erfcl(long double x);
|
||||
extern long double erfl(long double x);
|
||||
extern long double nextafterl(long double x, long double y);
|
||||
extern long double nexttowardl(long double x, long double y);
|
||||
extern long double remainderl(long double x, long double y);
|
||||
extern long double rintl(long double x);
|
||||
extern long double scalbnl(long double x, int n);
|
||||
extern long double scalblnl(long double x, long n);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
extern int log2( uint32 x );
|
||||
extern int radeon_log2( uint32 x );
|
||||
|
||||
static inline int RoundDiv( int num, int den )
|
||||
{
|
||||
|
||||
@@ -349,8 +349,8 @@ static status_t initRingBuffer( device_info *di, int aring_size )
|
||||
|
||||
// set ring buffer size
|
||||
// (it's log2 of qwords)
|
||||
OUTREG( regs, RADEON_CP_RB_CNTL, log2( cp->ring.size / 2 ));
|
||||
SHOW_INFO( 3, "CP buffer size mask=%d", log2( cp->ring.size / 2 ) );
|
||||
OUTREG( regs, RADEON_CP_RB_CNTL, radeon_log2( cp->ring.size / 2 ));
|
||||
SHOW_INFO( 3, "CP buffer size mask=%d", radeon_log2( cp->ring.size / 2 ) );
|
||||
|
||||
// set write pointer delay to zero;
|
||||
// we assume that memory synchronization is done correctly my MoBo
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
// get ceil( log2( size ))
|
||||
int log2( uint32 x )
|
||||
int radeon_log2( uint32 x )
|
||||
{
|
||||
int res;
|
||||
uint32 tmp;
|
||||
|
||||
Reference in New Issue
Block a user