Cambridge SMT System
createssgrammar.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.createssgrammar.hpp>
26 #include <main.custom_assert.hpp>
27 #include <main.logger.hpp>
29 
39 int
40 main ( int argc, const char *argv[] ) {
41  ucam::util::initLogger ( argc, argv );
42  FORCELINFO ( argv[0] << " starts!" );
43  ucam::util::RegistryPO rg ( argc, argv );
44  FORCELINFO ( rg.dump ( "CONFIG parameters:\n====================="
45  , "=====================" ) );
48  FORCELINFO ( argv[0] << " ends!" );
49  return 0;
50 }
void initLogger(int argc, const char *argv[])
Inits logger, parses param options checking for –logger.verbose.
#define FORCELINFO(msg)
Contains createssgrammar core implementation, single-threaded or multithreaded.
Included headers for all the binary (createssgrammar) should be defined here. This file should be inc...
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.
int main(int argc, const char *argv[])
Include all necessary headers here.
Static variable for custom_assert. Include only once from main file.