InnoDB Plugin  1.0
Functions
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
nin: 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
nin: number != 0
UNIV_INLINE ulint ut_max ( ulint  n1,
ulint  n2 
)

Calculates the maximum of two ulints.

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

Calculates the minimum of two ulints.

Returns
minimum
Parameters
n1in: first number
n2in: 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
a1in: more significant part of first pair
a2in: less significant part of first pair
b1in: more significant part of second pair
b2in: 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
aout: more significant part of minimum
bout: less significant part of minimum
a1in: more significant part of first pair
b1in: less significant part of first pair
a2in: more significant part of second pair
b2in: 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
ain: ulint
bin: ulint