Fabcoin Core
0.16.2
P2P Digital Currency
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
src
cpp-ethereum
libethash
util.h
Go to the documentation of this file.
1
/*
2
This file is part of ethash.
3
4
ethash is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
ethash is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with ethash. If not, see <http://www.gnu.org/licenses/>.
16
*/
21
#pragma once
22
#include <stdint.h>
23
#include "
compiler.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
#ifdef _MSC_VER
30
void
debugf
(
char
const
* str, ...);
31
#else
32
#define debugf printf
33
#endif
34
35
static
inline
uint32_t min_u32(uint32_t
a
, uint32_t
b
)
36
{
37
return
a < b ? a :
b
;
38
}
39
40
static
inline
uint32_t clamp_u32(uint32_t
x
, uint32_t min_, uint32_t max_)
41
{
42
return
x < min_ ? min_ : (x > max_ ? max_ :
x
);
43
}
44
45
#ifdef __cplusplus
46
}
47
#endif
compiler.h
a
#define a(i)
x
#define x(i)
b
#define b(i, j)
debugf
#define debugf
Definition:
util.h:32
Generated on Mon Oct 22 2018 15:15:27 for Fabcoin Core by
1.8.11