Cambridge SMT System
lmbr.main.cpp
Go to the documentation of this file.
1 // Licensed under the Apache License, Version 2.0 (the "License");
2 // you may not use these files except in compliance with the License.
3 // You may obtain a copy of the License at
4 //
5 // http://www.apache.org/licenses/LICENSE-2.0
6 //
7 // Unless required by applicable law or agreed to in writing, software
8 // distributed under the License is distributed on an "AS IS" BASIS,
9 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 // See the License for the specific language governing permissions and
11 // limitations under the License.
12 
13 // Copyright 2012 - Gonzalo Iglesias, Adrià de Gispert, William Byrne
14 
15 #define HIFST
16 
24 #include <main.lmbr.hpp>
26 #include <main.custom_assert.hpp>
27 #include <main.logger.hpp>
28 #include <main-run.lmbr.hpp>
29 
37 int
38 main ( int argc, const char *argv[] ) {
39  ucam::util::initLogger ( argc, argv );
40  FORCELINFO ( argv[0] << " starts!" );
41  ucam::util::RegistryPO rg ( argc, argv );
42  FORCELINFO ( rg.dump ( "CONFIG parameters:\n====================="
43  , "=====================" ) );
46  FORCELINFO ( argv[0] << " ends!" );
47  return 0;
48 }
Implements single-threaded version of alilats2splats tool.
void initLogger(int argc, const char *argv[])
Inits logger, parses param options checking for –logger.verbose.
#define FORCELINFO(msg)
int main(int argc, const char *argv[])
Include all necessary headers here.
Definition: lmbr.main.cpp:38
Static variables for logger. Include only once from main file.
std::string dump(const std::string &decorator_start="", const std::string &decorator_end="")
Dumps all configuration parameters into a string with a reasonably pretty format. ...
Definition: registrypo.hpp:108
Convenience wrapper class that can kick off two type of executions: single or multithreaded, triggered by program options. Possibly multithreading with 1 thread would do, but I keep both implementations as any plain bug that might arise will be easier to trace down with a serialized execution (threadpool uses two, actually). The class is templated with two classes, one for single threading and another for multithreading. Note that the multithreading details are up to the second templated class.
Included headers for all the binary should be defined here. This file should be included only once...
Static variable for custom_assert. Include only once from main file.