InnoDB Plugin  1.0
ut0ut.ic File Reference
This graph shows which files directly or indirectly include this file:

## Functions

UNIV_INLINE ulint ut_min (ulint n1, ulint n2)
UNIV_INLINE ulint ut_max (ulint n1, ulint n2)
UNIV_INLINE void ut_pair_min (ulint *a, ulint *b, ulint a1, ulint b1, ulint a2, ulint b2)
UNIV_INLINE int ut_ulint_cmp (ulint a, ulint b)
UNIV_INLINE int ut_pair_cmp (ulint a1, ulint a2, ulint b1, ulint b2)
UNIV_INLINE ulint ut_2_log (ulint n)
UNIV_INLINE ulint ut_2_exp (ulint n)

## Detailed Description

Various utilities

Created 5/30/1994 Heikki Tuuri

## Function Documentation

 UNIV_INLINE ulint ut_2_exp ( ulint n )

Calculates 2 to power n.

Returns
2 to power n
Parameters
 n in: number
 UNIV_INLINE ulint ut_2_log ( ulint n )

Calculates fast the 2-logarithm of a number, rounded upward to an integer.

Returns
logarithm in the base 2, rounded upward
Parameters
 n in: number != 0
 UNIV_INLINE ulint ut_max ( ulint n1, ulint n2 )

Calculates the maximum of two ulints.

Returns
maximum
Parameters
 n1 in: first number n2 in: second number
 UNIV_INLINE ulint ut_min ( ulint n1, ulint n2 )

Calculates the minimum of two ulints.

Returns
minimum
Parameters
 n1 in: first number n2 in: second number
 UNIV_INLINE int ut_pair_cmp ( ulint a1, ulint a2, ulint b1, ulint b2 )

Compares two pairs of ulints.

Returns
-1 if a < b, 0 if a == b, 1 if a > b
Parameters
 a1 in: more significant part of first pair a2 in: less significant part of first pair b1 in: more significant part of second pair b2 in: less significant part of second pair
 UNIV_INLINE void ut_pair_min ( ulint * a, ulint * b, ulint a1, ulint b1, ulint a2, ulint b2 )

Calculates minimum of two ulint-pairs.

Parameters
 a out: more significant part of minimum b out: less significant part of minimum a1 in: more significant part of first pair b1 in: less significant part of first pair a2 in: more significant part of second pair b2 in: less significant part of second pair
 UNIV_INLINE int ut_ulint_cmp ( ulint a, ulint b )

Compares two ulints.

Returns
1 if a > b, 0 if a == b, -1 if a < b
Parameters
 a in: ulint b in: ulint