]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/sort/benchmark/single/file_generator.cpp
1 //----------------------------------------------------------------------------
2 /// @file file_generator.cpp
3 /// @brief This program generte a file with random information, for to be used
4 /// in the benchmark programs
6 /// @author Copyright (c) 2016 Francisco José Tapia (fjtapia@gmail.com )\n
7 /// Distributed under the Boost Software License, Version 1.0.\n
8 /// ( See accompanying file LICENSE_1_0.txt or copy at
9 /// http://www.boost.org/LICENSE_1_0.txt )
13 //-----------------------------------------------------------------------------
14 #include <boost/sort/common/file_vector.hpp>
24 namespace bsc
= boost::sort::common
;
28 int main(int argc
, char *argv
[])
29 { //---------------------------- begin--------------------------------------
34 cout
<< "This program generate a file filled with random numbers\n";
35 cout
<< "of 64 bits\n";
36 cout
<< "The invocation format is :\n";
37 cout
<< " file_generator file_name number_elements\n\n";
41 number
= atoi(argv
[2]);
43 cout
<< "error, the number can't be zero\n";
47 if (bsc::generate_file(name
, number
) != 0)
48 std::cout
<< "Error in the file creation\n";
52 { //---------------------------- begin -------------------------------------
53 cout
<< " The format of this program is :\n";
54 cout
<< " file_generator number_elements\n\n";
55 cout
<< " The elements are 64 bits random numbers\n";