1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00

add --alignment and --malloc options to volk_gnsssdr-config-info

See
06ef4f42c7
This commit is contained in:
Carles Fernandez 2016-07-02 19:54:05 +02:00
parent cf53f86aea
commit e6b62b8399

View File

@ -41,6 +41,8 @@ main(int argc, char **argv)
("all-machines", "print VOLK_GNSSSDR machines built into library")
("avail-machines", "print VOLK_GNSSSDR machines the current platform can use")
("machine", "print the VOLK_GNSSSDR machine that will be used")
("alignment", "print the alignment that will be used")
("malloc", "print malloc implementation that will be used")
("version,v", "print VOLK_GNSSSDR version")
;
@ -84,5 +86,22 @@ main(int argc, char **argv)
std::cout << volk_gnsssdr_get_machine() << std::endl;
}
if(vm.count("alignment")) {
std::cout << "Alignment in bytes: " << volk_gnsssdr_get_alignment() << std::endl;
}
// You don't want to change the volk_malloc code, so just copy the if/else
// structure from there and give an explanation for the implementations
if(vm.count("malloc")) {
std::cout << "Used malloc implementation: ";
#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || HAVE_POSIX_MEMALIGN
std::cout << "posix_memalign" << std::endl;
#elif _MSC_VER >= 1400
std::cout << "aligned_malloc" << std::endl;
#else
std::cout << "No standard handler available, using own implementation." << std::endl;
#endif
}
return 0;
}