mlpack_main.hpp
Go to the documentation of this file.
1 
18 #ifndef MLPACK_CORE_UTIL_MLPACK_MAIN_HPP
19 #define MLPACK_CORE_UTIL_MLPACK_MAIN_HPP
20 
21 #define BINDING_TYPE_CLI 0
22 #define BINDING_TYPE_TEST 1
23 #define BINDING_TYPE_PYX 2
24 #define BINDING_TYPE_JL 3
25 #define BINDING_TYPE_GO 4
26 #define BINDING_TYPE_R 5
27 #define BINDING_TYPE_MARKDOWN 128
28 #define BINDING_TYPE_UNKNOWN -1
29 
30 #ifndef BINDING_TYPE
31 #define BINDING_TYPE BINDING_TYPE_UNKNOWN
32 #endif
33 
34 #ifndef BINDING_NAME
35  #error "BINDING_NAME not defined!"
36 #endif
37 
38 #if (BINDING_TYPE == BINDING_TYPE_CLI) // This is a command-line executable.
40 #elif (BINDING_TYPE == BINDING_TYPE_TEST) // This is a unit test.
42 #elif (BINDING_TYPE == BINDING_TYPE_PYX) // This is a Python binding.
44 #elif (BINDING_TYPE == BINDING_TYPE_JL) // This is a Julia binding.
46 #elif (BINDING_TYPE == BINDING_TYPE_GO) // This is a Go binding.
48 #elif (BINDING_TYPE == BINDING_TYPE_R) // This is an R binding.
50 #elif (BINDING_TYPE == BINDING_TYPE_MARKDOWN) // These are the Markdown docs.
52 #else
53  #error "Unknown binding type! Be sure BINDING_TYPE is defined if you are " \
54  "including <mlpack/core/util/mlpack_main.hpp>.";
55 #endif
56 
57 #include "param_checks.hpp"
58 
59 #endif