mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-26 23:22:53 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
c4c344e6c6
@ -1227,9 +1227,9 @@ else(DOXYGEN_FOUND)
|
|||||||
message(STATUS " Get it from http://www.stack.nl/~dimitri/doxygen/index.html")
|
message(STATUS " Get it from http://www.stack.nl/~dimitri/doxygen/index.html")
|
||||||
if(OS_IS_LINUX)
|
if(OS_IS_LINUX)
|
||||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||||
message(" or simply by doing 'sudo yum install doxygen-latex'.")
|
message(STATUS " or simply by doing 'sudo yum install doxygen-latex'.")
|
||||||
else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||||
message(" or simply by doing 'sudo apt-get install doxygen-latex'.")
|
message(STATUS " or simply by doing 'sudo apt-get install doxygen-latex'.")
|
||||||
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||||
endif(OS_IS_LINUX)
|
endif(OS_IS_LINUX)
|
||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
|
@ -62,7 +62,13 @@ int main(int argc, char **argv)
|
|||||||
print_malloc));
|
print_malloc));
|
||||||
our_options.add(option_t("version", "v", "print the VOLK_GNSSSDR version", volk_gnsssdr_version()));
|
our_options.add(option_t("version", "v", "print the VOLK_GNSSSDR version", volk_gnsssdr_version()));
|
||||||
|
|
||||||
our_options.parse(argc, argv);
|
try
|
||||||
|
{
|
||||||
|
our_options.parse(argc, argv);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ option_list::option_list(std::string program_name) :
|
|||||||
{ internal_list = std::vector<option_t>(); }
|
{ internal_list = std::vector<option_t>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void option_list::add(option_t opt) { internal_list.push_back(opt); }
|
void option_list::add(const option_t & opt) { internal_list.push_back(opt); }
|
||||||
|
|
||||||
void option_list::parse(int argc, char **argv) {
|
void option_list::parse(int argc, char **argv) {
|
||||||
for (int arg_number = 0; arg_number < argc; ++arg_number) {
|
for (int arg_number = 0; arg_number < argc; ++arg_number) {
|
||||||
@ -115,12 +115,15 @@ void option_list::parse(int argc, char **argv) {
|
|||||||
} catch (std::exception &exc) {
|
} catch (std::exception &exc) {
|
||||||
throw std::exception();
|
throw std::exception();
|
||||||
};
|
};
|
||||||
|
break;
|
||||||
case STRING:
|
case STRING:
|
||||||
std::cout << this_option->printval << std::endl;
|
std::cout << this_option->printval << std::endl;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
this_option->callback();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (std::string("--help") == std::string(argv[arg_number]) ||
|
if (std::string("--help") == std::string(argv[arg_number]) ||
|
||||||
std::string("-h") == std::string(argv[arg_number])) {
|
std::string("-h") == std::string(argv[arg_number])) {
|
||||||
@ -131,7 +134,7 @@ void option_list::parse(int argc, char **argv) {
|
|||||||
|
|
||||||
void option_list::help() {
|
void option_list::help() {
|
||||||
std::cout << program_name << std::endl;
|
std::cout << program_name << std::endl;
|
||||||
std::cout << " -h [ --help ] \t\tdisplay this help message" << std::endl;
|
std::cout << " -h [ --help ] \t\tDisplay this help message" << std::endl;
|
||||||
for (std::vector<option_t>::iterator this_option = internal_list.begin();
|
for (std::vector<option_t>::iterator this_option = internal_list.begin();
|
||||||
this_option != internal_list.end();
|
this_option != internal_list.end();
|
||||||
this_option++) {
|
this_option++) {
|
||||||
@ -144,13 +147,19 @@ void option_list::help() {
|
|||||||
|
|
||||||
switch (help_line.size() / 8) {
|
switch (help_line.size() / 8) {
|
||||||
case 0:
|
case 0:
|
||||||
help_line += "\t";
|
help_line += "\t\t\t\t";
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
help_line += "\t";
|
help_line += "\t\t\t";
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
help_line += "\t";
|
help_line += "\t\t";
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
help_line += "\t";
|
help_line += "\t";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
help_line += this_option->msg;
|
help_line += this_option->msg;
|
||||||
std::cout << help_line << std::endl;
|
std::cout << help_line << std::endl;
|
||||||
|
@ -55,7 +55,7 @@ class option_list
|
|||||||
public:
|
public:
|
||||||
option_list(std::string program_name);
|
option_list(std::string program_name);
|
||||||
|
|
||||||
void add(option_t opt);
|
void add(const option_t & opt);
|
||||||
|
|
||||||
void parse(int argc, char **argv);
|
void parse(int argc, char **argv);
|
||||||
|
|
||||||
|
@ -60,7 +60,15 @@ int main(int argc, char *argv[])
|
|||||||
profile_options.add((option_t("dry-run", "n", "Dry run. Respect other options, but don't write to file", set_dryrun)));
|
profile_options.add((option_t("dry-run", "n", "Dry run. Respect other options, but don't write to file", set_dryrun)));
|
||||||
profile_options.add((option_t("json", "j", "Write results to JSON file named as argument value", set_json)));
|
profile_options.add((option_t("json", "j", "Write results to JSON file named as argument value", set_json)));
|
||||||
profile_options.add((option_t("path", "p", "Specify the volk_config path", set_volk_config)));
|
profile_options.add((option_t("path", "p", "Specify the volk_config path", set_volk_config)));
|
||||||
profile_options.parse(argc, argv);
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
profile_options.parse(argc, argv);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
for (int arg_number = 0; arg_number < argc; ++arg_number) {
|
for (int arg_number = 0; arg_number < argc; ++arg_number) {
|
||||||
if (std::string("--help") == std::string(argv[arg_number]) ||
|
if (std::string("--help") == std::string(argv[arg_number]) ||
|
||||||
@ -216,20 +224,20 @@ void write_results(const std::vector<volk_gnsssdr_test_results_t> *results, bool
|
|||||||
// do not overwrite volk_gnsssdr_config when using a regex.
|
// do not overwrite volk_gnsssdr_config when using a regex.
|
||||||
if (not fs::exists(config_path.branch_path()))
|
if (not fs::exists(config_path.branch_path()))
|
||||||
{
|
{
|
||||||
std::cout << "Creating " << config_path.branch_path() << "..." << std::endl;
|
std::cout << "Creating " << config_path.branch_path() << " ..." << std::endl;
|
||||||
fs::create_directories(config_path.branch_path());
|
fs::create_directories(config_path.branch_path());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ofstream config;
|
std::ofstream config;
|
||||||
if(update_result) {
|
if(update_result) {
|
||||||
std::cout << "Updating " << path << "..." << std::endl;
|
std::cout << "Updating " << path << " ..." << std::endl;
|
||||||
config.open(path.c_str(), std::ofstream::app);
|
config.open(path.c_str(), std::ofstream::app);
|
||||||
if (!config.is_open()) { //either we don't have write access or we don't have the dir yet
|
if (!config.is_open()) { //either we don't have write access or we don't have the dir yet
|
||||||
std::cout << "Error opening file " << path << std::endl;
|
std::cout << "Error opening file " << path << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
std::cout << "Writing " << path << "..." << std::endl;
|
std::cout << "Writing " << path << " ..." << std::endl;
|
||||||
config.open(path.c_str());
|
config.open(path.c_str());
|
||||||
if (!config.is_open()) { //either we don't have write access or we don't have the dir yet
|
if (!config.is_open()) { //either we don't have write access or we don't have the dir yet
|
||||||
std::cout << "Error opening file " << path << std::endl;
|
std::cout << "Error opening file " << path << std::endl;
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
|
|
||||||
|
|
||||||
DEFINE_int32(cpu_multicorrelator_real_codes_iterations_test, 1000, "Number of averaged iterations in CPU multicorrelator test timing test");
|
DEFINE_int32(cpu_multicorrelator_real_codes_iterations_test, 100, "Number of averaged iterations in CPU multicorrelator test timing test");
|
||||||
DEFINE_int32(cpu_multicorrelator_real_codes_max_threads_test, 12, "Number of maximum concurrent correlators in CPU multicorrelator test timing test");
|
DEFINE_int32(cpu_multicorrelator_real_codes_max_threads_test, 12, "Number of maximum concurrent correlators in CPU multicorrelator test timing test");
|
||||||
|
|
||||||
void run_correlator_cpu_real_codes(cpu_multicorrelator_real_codes* correlator,
|
void run_correlator_cpu_real_codes(cpu_multicorrelator_real_codes* correlator,
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
|
|
||||||
|
|
||||||
DEFINE_int32(cpu_multicorrelator_iterations_test, 1000, "Number of averaged iterations in CPU multicorrelator test timing test");
|
DEFINE_int32(cpu_multicorrelator_iterations_test, 100, "Number of averaged iterations in CPU multicorrelator test timing test");
|
||||||
DEFINE_int32(cpu_multicorrelator_max_threads_test, 12, "Number of maximum concurrent correlators in CPU multicorrelator test timing test");
|
DEFINE_int32(cpu_multicorrelator_max_threads_test, 12, "Number of maximum concurrent correlators in CPU multicorrelator test timing test");
|
||||||
|
|
||||||
void run_correlator_cpu(cpu_multicorrelator* correlator,
|
void run_correlator_cpu(cpu_multicorrelator* correlator,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user