Frobby
0.10.0
Toggle main menu visibility
Loading...
Searching...
No Matches
src
stdinc.h
Go to the documentation of this file.
1
/* Frobby: Software for monomial ideal computations.
2
Copyright (C) 2007 Bjarke Hammersholt Roune (www.broune.com)
3
4
This program 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 2 of the License, or
7
(at your option) any later version.
8
9
This program 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 this program. If not, see http://www.gnu.org/licenses/.
16
*/
23
24
#ifndef STDINC_GUARD
25
#define STDINC_GUARD
26
27
// Some versions of GMP do not define gmp_fprintf unless cstdio is
28
// included first, so we have to include it here.
29
#include <cstdio>
30
#include <cstddef>
31
32
#include <gmp.h>
33
#include <gmpxx.h>
34
35
#include <cstddef>
36
#include <memory>
37
using namespace
std;
38
39
#ifdef DEBUG
40
#include <iostream>
// Useful for debugging.
41
#define PRINT
42
#define IF_DEBUG(X) X
43
#include <cassert>
44
#define ASSERT(X) assert(X);
45
void
*
operator
new
(
size_t
s,
const
char
* file,
size_t
line);
46
void
*
operator
new
[](
size_t
s,
const
char
* file,
size_t
line);
47
void
operator
delete
(
void
* s,
const
char
* file,
size_t
line);
48
void
operator
delete
[](
void
* s,
const
char
* file,
size_t
line);
49
#define FROBBY_NEW new (__FILE__, __LINE__)
50
#else
51
#define IF_DEBUG(X)
52
#define ASSERT(X)
53
#define FROBBY_NEW new
54
#endif
55
56
typedef
unsigned
int
Exponent;
57
60
typedef
unsigned
long
Word
;
61
static
const
size_t
BitsPerWord = 8 *
sizeof
(
Word
);
62
66
static
const
size_t
MemoryAlignment =
sizeof
(long);
67
68
#endif
Word
unsigned long Word
Definition
stdinc.h:60
Generated by
1.17.0