Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-498] Fix in DL data flow and trace alignment
[o-du/l2.git]
/
src
/
cm
/
cm_math.c
diff --git
a/src/cm/cm_math.c
b/src/cm/cm_math.c
index
052043c
..
4167831
100755
(executable)
--- a/
src/cm/cm_math.c
+++ b/
src/cm/cm_math.c
@@
-40,13
+40,9
@@
#include "ssi.h" /* system services interface */
#include "cm_math.h"
#include "ssi.h" /* system services interface */
#include "cm_math.h"
-#include "cm_math.x"
-
#include <stdlib.h>
#include <stdlib.h>
-
#include <math.h>
#include <math.h>
-
#ifdef SS_FLOAT
/*
*
#ifdef SS_FLOAT
/*
*
@@
-61,15
+57,7
@@
* File: cm_math.c
*
*/
* File: cm_math.c
*
*/
-#ifdef ANSI
-uint32_t cmAbs
-(
-F64 val
-)
-#else
-uint32_t cmAbs(val)
-F64 val;
-#endif
+uint32_t cmAbs(F64 val)
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((uint32_t) abs((int) val));/* G++ */
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((uint32_t) abs((int) val));/* G++ */
@@
-92,17
+80,7
@@
F64 val;
* File: cm_math.c
*
*/
* File: cm_math.c
*
*/
-#ifdef ANSI
-F64 cmPow
-(
-F64 x,
-F64 y
-)
-#else
-F64 cmPow(x, y)
-F64 x;
-F64 y;
-#endif
+F64 cmPow(F64 x,F64 y)
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((F64) pow((F64)x, (F64)y));
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((F64) pow((F64)x, (F64)y));
@@
-125,15
+103,7
@@
F64 y;
* File: cm_math.c
*
*/
* File: cm_math.c
*
*/
-#ifdef ANSI
-F64 cmFloor
-(
-F64 x
-)
-#else
-F64 cmFloor(x)
-F64 x;
-#endif
+F64 cmFloor(F64 x)
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((F64) floor((F64)x));
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((F64) floor((F64)x));
@@
-156,15
+126,7
@@
F64 x;
* File: cm_math.c
*
*/
* File: cm_math.c
*
*/
-#ifdef ANSI
-F64 cmLog
-(
-F64 x
-)
-#else
-F64 cmLog(x)
-F64 x;
-#endif
+F64 cmLog(F64 x)
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((F64) log((F64)x));
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((F64) log((F64)x));
@@
-187,15
+149,7
@@
F64 x;
* File: cm_math.c
*
*/
* File: cm_math.c
*
*/
-#ifdef ANSI
-F64 cmLog10
-(
-F64 x
-)
-#else
-F64 cmLog10(x)
-F64 x;
-#endif
+F64 cmLog10(F64 x)
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((F64) log10((F64)x));
{
#if (defined(SUNOS)|| defined(WIN32)|| defined(WIN2K)|| defined (SS_LINUX))
return ((F64) log10((F64)x));
@@
-203,6
+157,24
@@
F64 x;
} /* end of cmLog10 */
#endif /* SS_FLOAT */
} /* end of cmLog10 */
#endif /* SS_FLOAT */
+/*
+*
+* Fun: cmLog
+*
+* Desc: common primitive for computing the base 2 logrithm of x.
+*
+* Ret: log2(x)
+*
+* Notes: None
+*
+* File: cm_math.c
+*
+*/
+float cmLog2(uint32_t x)
+{
+ return ((float) log2(x));
+}
+
/**********************************************************************
End of file
**********************************************************************/
/**********************************************************************
End of file
**********************************************************************/