[hamradio-commits] [gnss-sdr] 09/16: add --alignment and --malloc options to volk_gnsssdr-config-info

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Mon Jul 4 17:33:14 UTC 2016


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.

commit e6b62b8399a802dbd2f1bb22d8024ad56204648a
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Sat Jul 2 19:54:05 2016 +0200

    add --alignment and --malloc options to volk_gnsssdr-config-info
    
    See
    https://github.com/gnuradio/volk/commit/06ef4f42c71fdbef31c39c72dd92245bfdebc896
---
 .../volk_gnsssdr/apps/volk_gnsssdr-config-info.cc     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc
index 72f3355..084855e 100644
--- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc
+++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc
@@ -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;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list