Main Page | Modules | Directories | File List | Globals | Related Pages

gm_log2.c File Reference

#include "gm_internal.h"

Functions

GM_ENTRY_POINT unsigned long gm_log2_roundup (unsigned long n)

Variables

GM_ENTRY_POINT const unsigned
char 
gm_log2_roundup_table [257]

Detailed Description

This file contains the GM API functions related to base 2 logarithmic computations.

gm_log2_roundup_table(), gm_log2_roundup().


Function Documentation

GM_ENTRY_POINT unsigned long gm_log2_roundup unsigned long  n  ) 
 

gm_log2_roundup() returns the logarithm, base 2, of n, rounding up to the next integer.

Return values:
LOG 
Parameters:
n (IN) The integer for which the logarithm will be computed.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)


Variable Documentation

GM_ENTRY_POINT const unsigned char gm_log2_roundup_table[257]
 

Initial value:

 {
  0,
  0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
  6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
}
Log 2 roundup table. (Details).


Generated on Sat May 20 19:20:41 2006 for GM by  doxygen 1.4.4