I managed to compile the following main function using Windows Studio 2012 under a 64 bit release configuration: https://github.com/kpu/kenlm/blob/master/lm/builder/dump_counts_main.cc
Because I will be using it process TB of data I wanted to see if I could direct the output directly to a file instead of through cout
. While I have found good advice on how to write files to disk fast I am not exactly sure how to pass the following statements into the fwrite
functions.
std::cout << vocab.Lookup(*i) << ' ';
std::cout << *reinterpret_cast<const uint64_t*>(words + order) << '\n';
Anyone have any idea how they can be converted to an array of elements converted to a const void*
?