SHOGUN  v2.1.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 #ifndef __COMMON_H__
16 #define __COMMON_H__
17 
18 #include <stdlib.h>
19 #include <stdio.h>
20 #include <shogun/lib/config.h>
21 
22 #ifndef LINUX
23 #define RANDOM_MAX 2147483647
24 #else
25 #define RANDOM_MAX RAND_MAX
26 #endif
27 
32 
33 #include <stdint.h>
34 
35 /* No feature test:
36  * ISO C99: 7.8 Format conversion of integer types <inttypes.h>
37  *
38  * If not supported make sure that your development environment is
39  * supporting ISO C99!
40  */
41 #ifdef __STDC_FORMAT_MACROS
42 #include <inttypes.h>
43 #else
44 #define __STDC_FORMAT_MACROS 1
45 #include <inttypes.h>
46 #undef __STDC_FORMAT_MACROS
47 #endif
48 
53 typedef float float32_t;
54 typedef double float64_t;
55 typedef long double floatmax_t;
56 
58 
59 #define STRING_LEN 256
60 #define STRING_LEN_STR "256"
61 typedef char string_t[STRING_LEN];
62 
63 typedef int machine_int_t;
64 
66 typedef int32_t index_t;
67 
68 
69 #include <shogun/lib/memory.h>
70 #endif //__COMMON_H__

SHOGUN Machine Learning Toolbox - Documentation