zenilib: zenilib/jni/external/sdl/SDL/SDL_bits.h File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
SDL_bits.h File Reference
`#include "SDL_stdinc.h"`
`#include "begin_code.h"`
`#include "close_code.h"`

Go to the source code of this file.

## Functions

SDL_FORCE_INLINE int | SDL_MostSignificantBitIndex32 (Uint32 x)

## Detailed Description

Functions for fiddling with bits and bitmasks.

Definition in file SDL_bits.h.

## Function Documentation

SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32 | ( | Uint32 | x | ) |

Get the index of the most significant bit. Result is undefined when called with 0. This operation can also be stated as "count leading zeroes" and "log base 2".

Returns
  Index of the most significant bit, or -1 if the value is 0.

Definition at line 51 of file SDL_bits.h.

References i.

Referenced by SDL_PrivateShouldInitSubsystem(), SDL_PrivateShouldQuitSubsystem(), SDL_PrivateSubsystemRefCountDecr(), SDL_PrivateSubsystemRefCountIncr(), and SDL_WasInit().