| 1 | #ifdef TMTO_WINDOWS |
|---|
| 2 | #define WIN32_LEAN_AND_MEAN |
|---|
| 3 | #endif |
|---|
| 4 | #define BOOST_REGEX_NO_EXTERNAL_TEMPLATES |
|---|
| 5 | #include <iostream> |
|---|
| 6 | #include <iomanip> |
|---|
| 7 | #include <string> |
|---|
| 8 | #include <algorithm> |
|---|
| 9 | |
|---|
| 10 | #include <tmto/includes.hpp> |
|---|
| 11 | |
|---|
| 12 | #include <stxxl/stream> |
|---|
| 13 | #include <tmto/misc/stdint.hpp> |
|---|
| 14 | |
|---|
| 15 | #include <boost/asio.hpp> |
|---|
| 16 | |
|---|
| 17 | namespace mpl = boost::mpl; |
|---|
| 18 | namespace fusion = boost::fusion; |
|---|
| 19 | using namespace boost::mpl::placeholders; |
|---|
| 20 | |
|---|
| 21 | #include <boost/program_options.hpp> |
|---|
| 22 | |
|---|
| 23 | #include <tmto/utility/misc.hpp> |
|---|
| 24 | |
|---|
| 25 | #include <tmto/static_sequence/access.hpp> |
|---|
| 26 | |
|---|
| 27 | #define DEFINE_STATIC_STORAGE |
|---|
| 28 | #define DEFINE_FREE_FUNCTIONS |
|---|
| 29 | #include <tmto/plugin/registry_methods.hpp> |
|---|
| 30 | |
|---|
| 31 | #include <tmto/logger/all_loggers.hpp> |
|---|
| 32 | |
|---|
| 33 | #include <tmto/condition/condition.hpp> |
|---|
| 34 | #include <tmto/round_function/round_function.hpp> |
|---|
| 35 | //#include <tmto/static_configuration.hpp> |
|---|
| 36 | #include <tmto/static_configuration_host.hpp> |
|---|
| 37 | //#include <tmto/device/all_devices_methods.hpp> |
|---|
| 38 | //#include <tmto/device/cuda/host_side_methods.hpp> |
|---|
| 39 | |
|---|
| 40 | //#include <tmto/implementation_methods.hpp> |
|---|
| 41 | |
|---|
| 42 | //#include <tmto/work_generators.cpp> |
|---|
| 43 | //#include <tmto/work_consumers.cpp> |
|---|
| 44 | |
|---|
| 45 | //#include <tmto/round_function/generator/all_generators_methods.hpp> |
|---|
| 46 | |
|---|
| 47 | //#include <tmto/algorithm/A51/implementation/cuda/all_implementations.hpp> |
|---|
| 48 | //#include <tmto/algorithm/A51/implementation/spe/all_implementations.hpp> |
|---|
| 49 | //#include <tmto/algorithm/A51/implementation/sse/all_implementations.hpp> |
|---|
| 50 | //#include <tmto/algorithm/A51/implementation/altivec/all_implementations.hpp> |
|---|
| 51 | #include <tmto/algorithm/A51.hpp> |
|---|
| 52 | #include <tmto/configuration.hpp> |
|---|
| 53 | #include <tmto/configuration/boost_mpl.hpp> |
|---|
| 54 | #include <tmto/configuration/output.hpp> |
|---|
| 55 | #include <tmto/configuration/select.hpp> |
|---|
| 56 | #include <tmto/highlevel/frontend_methods.hpp> |
|---|
| 57 | #include <tmto/device/device.hpp> |
|---|
| 58 | //#include <tmto/algorithm/algorithm_methods.hpp> |
|---|
| 59 | //#include <tmto/work_generator/work_generator_methods.hpp> |
|---|
| 60 | //#include <tmto/work_consumer/work_consumer_methods.hpp> |
|---|
| 61 | //#include <tmto/work_consumer/all_work_consumers_methods.hpp> |
|---|
| 62 | //#include <tmto/logger/logger_methods.hpp> |
|---|
| 63 | //#include <tmto/device/cuda/working_set_methods.hpp> |
|---|
| 64 | //#include <tmto/device/spe/working_set_methods.hpp> |
|---|
| 65 | //#include <tmto/device/sse/working_set_methods.hpp> |
|---|
| 66 | //#include <tmto/device/altivec/working_set_methods.hpp> |
|---|
| 67 | //#include <tmto/work_intermediate/work_intermediate_methods.hpp> |
|---|
| 68 | //#include <tmto/work_management/work_management_methods.hpp> |
|---|
| 69 | |
|---|
| 70 | #include <tmto/highlevel/all_frontends.hpp> |
|---|
| 71 | |
|---|
| 72 | //typedef tmto::configuration::supported_implementations_mpl< |
|---|
| 73 | // tmto::configuration::supported_implementations |
|---|
| 74 | //>::type implementations_list; |
|---|
| 75 | //typedef tmto::configuration::supported_combined_implementations_mpl< |
|---|
| 76 | // tmto::configuration::supported_combined_implementations |
|---|
| 77 | //>::type combined_implementations_list; |
|---|
| 78 | |
|---|
| 79 | //typedef tmto::configuration::supported_conditions_mpl<tmto::configuration::supported_conditions>::type conditions_list; |
|---|
| 80 | //typedef tmto::configuration::supported_round_functions_mpl<tmto::configuration::supported_round_functions>::type round_functions_list; |
|---|
| 81 | |
|---|
| 82 | #include <tmto/configuration/signaling_methods.hpp> |
|---|
| 83 | #include <tmto/logger/logger_methods.hpp> |
|---|
| 84 | #include <tmto/algorithm/algorithm_methods.hpp> |
|---|
| 85 | #include <tmto/implementation_methods.hpp> |
|---|
| 86 | |
|---|
| 87 | #include <tmto/utility/exception/report.hpp> |
|---|
| 88 | |
|---|
| 89 | #include <tmto/threading/id_methods.hpp> |
|---|
| 90 | #include <tmto/utility/debug_methods.hpp> |
|---|
| 91 | |
|---|
| 92 | //#include <tmto/algorithm/A51/implementation/cuda/nvcc/all_implementations.hpp> |
|---|
| 93 | |
|---|
| 94 | int |
|---|
| 95 | main(int argc, char **argv) { |
|---|
| 96 | tmto::utility::threadsafe_stream s1; |
|---|
| 97 | boost::iostreams::stream_buffer<tmto::utility::threadsafe_stream> s(s1, 0, 0); |
|---|
| 98 | |
|---|
| 99 | #ifdef DEBUGGING |
|---|
| 100 | tmto::debugstr.rdbuf(&s); |
|---|
| 101 | #endif |
|---|
| 102 | try { |
|---|
| 103 | tmto::highlevel::frontend::frontend * frontend = |
|---|
| 104 | tmto::highlevel::frontend::select_frontend< |
|---|
| 105 | tmto::highlevel::frontend::frontend_list |
|---|
| 106 | >(argc, argv); |
|---|
| 107 | |
|---|
| 108 | if (!frontend) { |
|---|
| 109 | std::cerr << "no frontend\n"; |
|---|
| 110 | } |
|---|
| 111 | |
|---|
| 112 | frontend->run(); |
|---|
| 113 | |
|---|
| 114 | exit(0); |
|---|
| 115 | } catch (boost::exception & e) { |
|---|
| 116 | if (tmto::exception::report<>::invoke(e, std::cerr)) { |
|---|
| 117 | exit(1); |
|---|
| 118 | } else { |
|---|
| 119 | std::cerr << diagnostic_information(e) << "\n"; |
|---|
| 120 | exit(1); |
|---|
| 121 | } |
|---|
| 122 | } catch (std::exception & e) { |
|---|
| 123 | std::cerr << e.what() << "\n"; |
|---|
| 124 | exit(1); |
|---|
| 125 | } catch (...) { |
|---|
| 126 | std::cerr << "unhandled exception thrown\n"; |
|---|
| 127 | exit(1); |
|---|
| 128 | } |
|---|
| 129 | } |
|---|