MLPACK  1.0.11
prereqs.hpp
Go to the documentation of this file.
1 
21 #ifndef __MLPACK_PREREQS_HPP
22 #define __MLPACK_PREREQS_HPP
23 
24 // First, check if Armadillo was included before, warning if so.
25 #ifdef ARMA_INCLUDES
26 #pragma message "Armadillo was included before mlpack; this can sometimes cause\
27 problems. It should only be necessary to include <mlpack/core.hpp> and not\
28 <armadillo>."
29 #endif
30 
31 // Next, standard includes.
32 #include <stdlib.h>
33 #include <stdio.h>
34 #include <string.h>
35 #include <ctype.h>
36 #include <limits.h>
37 #include <float.h>
38 #include <stdint.h>
39 #include <iostream>
40 
41 // Defining _USE_MATH_DEFINES should set M_PI.
42 #define _USE_MATH_DEFINES
43 #include <math.h>
44 
45 // For tgamma().
46 #include <boost/math/special_functions/gamma.hpp>
47 
48 // But if it's not defined, we'll do it.
49 #ifndef M_PI
50  #define M_PI 3.141592653589793238462643383279
51 #endif
52 
53 // Give ourselves a nice way to force functions to be inline if we need.
54 #define force_inline
55 #if defined(__GNUG__) && !defined(DEBUG)
56  #undef force_inline
57  #define force_inline __attribute__((always_inline))
58 #elif defined(_MSC_VER) && !defined(DEBUG)
59  #undef force_inline
60  #define force_inline __forceinline
61 #endif
62 
63 // Now include Armadillo through the special mlpack extensions.
64 #include <mlpack/core/arma_extend/arma_extend.hpp>
65 
66 // On Visual Studio, disable C4519 (default arguments for function templates)
67 // since it's by default an error, which doesn't even make any sense because
68 // it's part of the C++11 standard.
69 #ifdef _MSC_VER
70  #pragma warning(disable : 4519)
71 #endif
72 
73 #endif