SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
common.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 1999-2009 Soeren Sonnenburg
8  * Written (W) 1999-2008 Gunnar Raetsch
9  * Written (W) 2006 Fabio De Bona
10  * Written (W) 2006 Konrad Rieck
11  * Written (W) 2006-2008 Christian Gehl
12  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
13  */
14 
15 #include <shogun/lib/memory.h>
16 
17 #ifndef __COMMON_H__
18 #define __COMMON_H__
19 
20 #include <stdlib.h>
21 #include <stdio.h>
22 #include <shogun/lib/config.h>
23 
24 #ifndef LINUX
25 #define RANDOM_MAX 2147483647
26 #else
27 #define RANDOM_MAX RAND_MAX
28 #endif
29 
34 
35 #include <stdint.h>
36 
37 /* No feature test:
38  * ISO C99: 7.8 Format conversion of integer types <inttypes.h>
39  *
40  * If not supported make sure that your development environment is
41  * supporting ISO C99!
42  */
43 #ifdef __STDC_FORMAT_MACROS
44 #include <inttypes.h>
45 #else
46 #define __STDC_FORMAT_MACROS 1
47 #include <inttypes.h>
48 #undef __STDC_FORMAT_MACROS
49 #endif
50 
55 typedef float float32_t;
56 typedef double float64_t;
57 typedef long double floatmax_t;
58 
60 
61 #define STRING_LEN 256
62 #define STRING_LEN_STR "256"
63 typedef char string_t[STRING_LEN];
64 
65 typedef int machine_int_t;
66 
67 #endif //__COMMON_H__

SHOGUN Machine Learning Toolbox - Documentation