36 #ifndef SHARK_CORE_SHARK_H 37 #define SHARK_CORE_SHARK_H 39 #include <boost/version.hpp> 40 #include <boost/assign.hpp> 41 #include <boost/config.hpp> 42 #include <boost/property_tree/ptree.hpp> 43 #include <boost/property_tree/json_parser.hpp> 76 #if defined( _DEBUG ) || defined( DEBUG ) 87 struct DynamicLibraryTag{
91 #ifdef SHARK_USE_DYNLIB 92 static const bool VALUE =
true;
94 static const bool VALUE =
false;
103 #ifdef SHARK_USE_SIMD 104 #define REMORA_USE_SIMD 109 #define SHARK_USE_CBLAS 110 #ifdef SHARK_USE_CBLAS 111 #define REMORA_USE_CBLAS 118 #ifdef SHARK_USE_CLBLAS 119 #define REMORA_USE_GPU 138 static const bool VALUE =
true;
140 static const bool VALUE =
false;
147 struct OfficialReleaseTag {
148 #ifdef SHARK_OFFICIAL_RELEASE 149 static const bool VALUE =
true;
151 static const bool VALUE =
false;
172 template<
unsigned int major,
unsigned int minor,
unsigned int patch>
177 return(
"%d.%d.%d" );
210 BOOST_VERSION / 100000,
211 ((BOOST_VERSION / 100) % 1000),
212 (BOOST_VERSION % 100)
219 return( tag::BuildTypeTag::VALUE );
226 return( tag::OpenMpTag::VALUE );
233 return( tag::DynamicLibraryTag::VALUE );
240 return( tag::OfficialReleaseTag::VALUE );
246 template<
typename Stream>
247 static void info( Stream & s ) {
250 boost::property_tree::ptree pt, version;
251 version.add(
"major", version_type::MAJOR());
252 version.add(
"minor", version_type::MINOR());
253 version.add(
"patch", version_type::PATCH());
255 pt.add_child(
"version", version);
256 pt.add(
"isOfficialRelease", isOfficialRelease());
257 pt.add(
"platform", BOOST_PLATFORM);
258 pt.add(
"compiler", BOOST_COMPILER);
259 pt.add(
"stdLib", BOOST_STDLIB);
260 version.put(
"major", boost_version_type::MAJOR());
261 version.put(
"minor", boost_version_type::MINOR());
262 version.put(
"patch", boost_version_type::PATCH());
263 pt.add_child(
"boostVersion", version);
264 pt.add(
"buildType", buildTypeMap[buildType()]);
265 pt.add(
"dynamicBuild", isDynamicLibrary());
266 pt.add(
"hasOpenMp", hasOpenMp());
268 boost::property_tree::write_json(s, pt);