drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
ut0rnd.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1994, 2009, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/******************************************************************/
25
26#pragma once
27#ifndef ut0rnd_h
28#define ut0rnd_h
29
30#include "univ.i"
31
32#include "ut0byte.h"
33
36#define UT_END_OF_FIELD 257
37
38/********************************************************/
40UNIV_INLINE
41void
43/*============*/
44 ulint seed);
45/********************************************************/
48UNIV_INLINE
49ulint
51/*==================*/
52 ulint rnd);
53/*********************************************************/
59UNIV_INLINE
60ulint
62/*==================*/
63/********************************************************/
66UNIV_INLINE
67ulint
69/*============*/
70 ulint low,
71 ulint high);
72/*********************************************************/
75UNIV_INLINE
76ibool
78/*=================*/
79/*******************************************************/
84UNIV_INLINE
85ulint
87/*==========*/
88 ulint key,
89 ulint table_size);
90/*************************************************************/
93UNIV_INLINE
94ulint
96/*===============*/
97 ulint n1,
98 ulint n2)
99 __attribute__((const));
100/*************************************************************/
103UNIV_INLINE
104ulint
106/*========*/
107 ib_uint64_t d)
108 __attribute__((const));
109/*************************************************************/
112UNIV_INLINE
113ulint
115/*===========*/
116 const char* str)
117 __attribute__((pure));
118/*************************************************************/
121UNIV_INLINE
122ulint
124/*===========*/
125 const byte* str,
126 ulint len)
127 __attribute__((pure));
128/***********************************************************/
132UNIV_INTERN
133ulint
135/*==========*/
136 ulint n)
137 __attribute__((const));
138
139
140#ifndef UNIV_NONINL
141#include "ut0rnd.ic"
142#endif
143
144#endif
UNIV_INLINE ulint ut_rnd_gen_next_ulint(ulint rnd)
UNIV_INLINE ulint ut_fold_string(const char *str) __attribute__((pure))
UNIV_INLINE ulint ut_rnd_gen_ulint(void)
UNIV_INTERN ulint ut_find_prime(ulint n) __attribute__((const))
UNIV_INLINE ulint ut_fold_ull(ib_uint64_t d) __attribute__((const))
UNIV_INLINE ulint ut_rnd_interval(ulint low, ulint high)
UNIV_INLINE void ut_rnd_set_seed(ulint seed)
UNIV_INLINE ibool ut_rnd_gen_ibool(void)
UNIV_INLINE ulint ut_hash_ulint(ulint key, ulint table_size)
UNIV_INLINE ulint ut_fold_ulint_pair(ulint n1, ulint n2) __attribute__((const))
UNIV_INLINE ulint ut_fold_binary(const byte *str, ulint len) __attribute__((pure))