Skip to content

Instantly share code, notes, and snippets.

@noc0lour
Created February 13, 2018 21:40
Show Gist options
  • Save noc0lour/6de146ccab8447fa6e148b294f01cdb4 to your computer and use it in GitHub Desktop.
Save noc0lour/6de146ccab8447fa6e148b294f01cdb4 to your computer and use it in GitHub Desktop.
From 6b71e34253038b278faf348c2d70a274707df4aa Mon Sep 17 00:00:00 2001
From: Andrej Rode <mail@andrejro.de>
Date: Tue, 13 Feb 2018 22:34:22 +0100
Subject: [PATCH] iwyu run
---
apps/volk-config-info.cc | 11 +++++++----
apps/volk_option_helpers.cc | 4 +++-
apps/volk_profile.cc | 28 +++++++++++++++-------------
apps/volk_profile.h | 7 +++++++
lib/qa_utils.cc | 42 ++++++++++++++++++++++--------------------
lib/qa_utils.h | 17 ++++++++++-------
lib/testqa.cc | 19 ++++++++++---------
7 files changed, 74 insertions(+), 54 deletions(-)
diff --git a/apps/volk-config-info.cc b/apps/volk-config-info.cc
index 74d6311..6c2d67f 100644
--- a/apps/volk-config-info.cc
+++ b/apps/volk-config-info.cc
@@ -24,10 +24,13 @@
#include <config.h>
#endif
-#include <volk/constants.h>
-#include "volk/volk.h"
-#include <iostream>
-#include "volk_option_helpers.h"
+#include <features.h> // for _POSIX_C_SOURCE, _XOPEN_SOURCE
+#include <volk/constants.h> // for volk_available_machines, volk_c_com...
+#include <iostream> // for operator<<, endl, cout, ostream
+#include <string> // for string
+
+#include "volk/volk.h" // for volk_get_alignment, volk_get_machine
+#include "volk_option_helpers.h" // for option_list, option_t
void print_alignment()
{
diff --git a/apps/volk_option_helpers.cc b/apps/volk_option_helpers.cc
index c938d90..a941d65 100644
--- a/apps/volk_option_helpers.cc
+++ b/apps/volk_option_helpers.cc
@@ -4,7 +4,9 @@
#include "volk_option_helpers.h"
-#include <iostream>
+#include <bits/exception.h> // for exception
+#include <iostream> // for operator<<, endl, basic_ostream, cout
+#include <utility> // for pair
/*
* Option type
diff --git a/apps/volk_profile.cc b/apps/volk_profile.cc
index 6c64569..de66d2d 100644
--- a/apps/volk_profile.cc
+++ b/apps/volk_profile.cc
@@ -20,21 +20,23 @@
* Boston, MA 02110-1301, USA.
*/
-#include "qa_utils.h"
-#include "kernel_tests.h"
-#include "volk_option_helpers.h"
+#include <boost/filesystem/operations.hpp> // for create_directories, exists
+#include <boost/filesystem/path.hpp> // for path, operator<<
+#include <boost/filesystem/path_traits.hpp> // for filesystem
+#include <stddef.h> // for size_t
+#include <sys/stat.h> // for stat
+#include <volk/volk_prefs.h> // for volk_get_config_path
+#include <iostream> // for operator<<, basic_ostream
+#include <map> // for map, map<>::iterator
+#include <utility> // for pair
+#include <vector> // for vector, vector<>::const_...
+
+#include "kernel_tests.h" // for init_test_list
+#include "qa_utils.h" // for volk_test_results_t, vol...
+#include "volk/volk_complex.h" // for lv_32fc_t
+#include "volk_option_helpers.h" // for option_list, option_t
#include "volk_profile.h"
-#include <volk/volk.h>
-#include <volk/volk_prefs.h>
-
-#include <vector>
-#include <boost/filesystem.hpp>
-#include <iostream>
-#include <fstream>
-#include <sys/stat.h>
-#include <sys/types.h>
-
namespace fs = boost::filesystem;
diff --git a/apps/volk_profile.h b/apps/volk_profile.h
index 6e717a9..51629ab 100644
--- a/apps/volk_profile.h
+++ b/apps/volk_profile.h
@@ -1,5 +1,12 @@
+#include <stdbool.h> // for bool
+#include <iosfwd> // for ofstream
+#include <string> // for string
+#include <vector> // for vector
+
+class volk_test_results_t;
+
void read_results(std::vector<volk_test_results_t> *results);
void read_results(std::vector<volk_test_results_t> *results, std::string path);
void write_results(const std::vector<volk_test_results_t> *results, bool update_result);
diff --git a/lib/qa_utils.cc b/lib/qa_utils.cc
index ab8f47a..c654627 100644
--- a/lib/qa_utils.cc
+++ b/lib/qa_utils.cc
@@ -1,25 +1,27 @@
#include "qa_utils.h"
-#include <boost/foreach.hpp>
-#include <boost/tokenizer.hpp>
-#include <boost/lexical_cast.hpp>
-#include <boost/typeof/typeof.hpp>
-#include <boost/type_traits.hpp>
-
-#include <iostream>
-#include <cstring>
-#include <fstream>
-#include <vector>
-#include <map>
-#include <list>
-#include <ctime>
-#include <cmath>
-#include <limits>
-
-#include <volk/volk.h>
-#include <volk/volk_cpu.h>
-#include <volk/volk_common.h>
-#include <volk/volk_malloc.h>
+#include <assert.h> // for assert
+#include <bits/stdint-intn.h> // for int16_t, int32_t
+#include <bits/stdint-uintn.h> // for uint16_t, uint64_t
+#include <bits/types/clock_t.h> // for clock_t
+#include <boost/foreach.hpp> // for auto_any_base
+#include <boost/lexical_cast.hpp> // for lexical_cast
+#include <boost/lexical_cast/bad_lexical_cast.hpp> // for bad_lexical_cast
+#include <boost/token_functions.hpp> // for char_separator
+#include <boost/token_iterator.hpp> // for token_iterator
+#include <boost/tokenizer.hpp> // for tokenizer
+#include <sys/time.h> // for CLOCKS_PER_SEC
+#include <sys/types.h> // for int8_t
+#include <volk/volk.h> // for volk_func_desc_t
+#include <volk/volk_malloc.h> // for volk_free, volk_m...
+#include <cmath> // for sqrt, fabs, abs
+#include <cstring> // for memcpy, memset
+#include <ctime> // for clock
+#include <fstream> // for operator<<, basic...
+#include <iostream> // for cout, cerr
+#include <limits> // for numeric_limits
+#include <map> // for map, map<>::mappe...
+#include <vector> // for vector, _Bit_refe...
float uniform() {
return 2.0f * ((float) rand() / RAND_MAX - 0.5f); // uniformly (-1, 1)
diff --git a/lib/qa_utils.h b/lib/qa_utils.h
index 3dbc9d5..09924f6 100644
--- a/lib/qa_utils.h
+++ b/lib/qa_utils.h
@@ -1,14 +1,17 @@
#ifndef VOLK_QA_UTILS_H
#define VOLK_QA_UTILS_H
-#include <cstdlib>
-#include <string>
-#include <iostream>
-#include <fstream>
-#include <vector>
-#include <map>
-#include <volk/volk.h>
+#include <stdbool.h> // for bool, false
+#include <volk/volk.h> // for volk_func_desc_t
#include <volk/volk_common.h>
+#include <cstdlib> // for NULL
+#include <fstream>
+#include <iostream>
+#include <map> // for map
+#include <string> // for string, basic_string
+#include <vector> // for vector
+
+#include "volk/volk_complex.h" // for lv_32fc_t
/************************************************
* VOLK QA type definitions *
diff --git a/lib/testqa.cc b/lib/testqa.cc
index d014a53..183d8db 100644
--- a/lib/testqa.cc
+++ b/lib/testqa.cc
@@ -20,15 +20,16 @@
* Boston, MA 02110-1301, USA.
*/
-#include "qa_utils.h"
-#include "kernel_tests.h"
-
-#include <volk/volk.h>
-
-#include <vector>
-#include <utility>
-#include <iostream>
-#include <fstream>
+#include <stdbool.h> // for bool, false, true
+#include <iostream> // for operator<<, basic_ostream, endl, char...
+#include <map> // for map, map<>::iterator, _Rb_tree_iterator
+#include <string> // for string, operator<<
+#include <utility> // for pair
+#include <vector> // for vector
+
+#include "kernel_tests.h" // for init_test_list
+#include "qa_utils.h" // for volk_test_case_t, volk_test_results_t
+#include "volk/volk_complex.h" // for lv_32fc_t
void print_qa_xml(std::vector<volk_test_results_t> results, unsigned int nfails);
--
2.16.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment