diff options
Diffstat (limited to 'host/lib/experts')
| -rw-r--r-- | host/lib/experts/expert_container.cpp | 21 | ||||
| -rw-r--r-- | host/lib/experts/expert_nodes.hpp | 9 | 
2 files changed, 14 insertions, 16 deletions
diff --git a/host/lib/experts/expert_container.cpp b/host/lib/experts/expert_container.cpp index 853e3e4b7..f010293b7 100644 --- a/host/lib/experts/expert_container.cpp +++ b/host/lib/experts/expert_container.cpp @@ -17,9 +17,8 @@  #include "expert_container.hpp"  #include <uhd/exception.hpp> -#include <uhd/utils/msg.hpp> +#include <uhd/utils/log.hpp>  #include <boost/format.hpp> -#include <boost/foreach.hpp>  #include <boost/function.hpp>  #include <boost/bind.hpp>  #include <boost/make_shared.hpp> @@ -185,7 +184,7 @@ public:              EX_LOG(1, "cycle check ... PASSED");          } else {              EX_LOG(1, "cycle check ... ERROR!!!"); -            BOOST_FOREACH(const std::string& e, back_edges) { +            for(const std::string& e:  back_edges) {                  EX_LOG(2, "back edge: " + e);              }          } @@ -193,7 +192,7 @@ public:          //Test 2: Check data node input and output edges          std::vector<std::string> data_node_issues; -        BOOST_FOREACH(const vertex_map_t::value_type& v, _datanode_map) { +        for(const vertex_map_t::value_type& v:  _datanode_map) {              size_t in_count = 0, out_count = 0;              for (std::pair<edge_iter, edge_iter> ei = boost::edges(_expert_dag);                   ei.first != ei.second; @@ -238,7 +237,7 @@ public:              EX_LOG(1, "data node check ... PASSED");          } else {              EX_LOG(1, "data node check ... WARNING!"); -            BOOST_FOREACH(const std::string& i, data_node_issues) { +            for(const std::string& i:  data_node_issues) {                  EX_LOG(2, i);              }          } @@ -246,7 +245,7 @@ public:          //Test 3: Check worker node input and output edges          std::vector<std::string> worker_issues; -        BOOST_FOREACH(const vertex_map_t::value_type& v, _worker_map) { +        for(const vertex_map_t::value_type& v:  _worker_map) {              size_t in_count = 0, out_count = 0;              for (std::pair<edge_iter, edge_iter> ei = boost::edges(_expert_dag);                   ei.first != ei.second; @@ -268,7 +267,7 @@ public:              EX_LOG(1, "worker check ... PASSED");          } else {              EX_LOG(1, "worker check ... WARNING!"); -            BOOST_FOREACH(const std::string& i, worker_issues) { +            for(const std::string& i:  worker_issues) {                  EX_LOG(2, i);              }          } @@ -347,7 +346,7 @@ protected:              _worker_map.insert(vertex_map_t::value_type(worker->get_name(), gr_node));              //For each input, add an edge from the input to this node -            BOOST_FOREACH(const std::string& node_name, worker->get_inputs()) { +            for(const std::string& node_name:  worker->get_inputs()) {                  vertex_map_t::const_iterator node = _datanode_map.find(node_name);                  if (node != _datanode_map.end()) {                      boost::add_edge((*node).second, gr_node, _expert_dag); @@ -358,7 +357,7 @@ protected:              }              //For each output, add an edge from this node to the output -            BOOST_FOREACH(const std::string& node_name, worker->get_outputs()) { +            for(const std::string& node_name:  worker->get_outputs()) {                  vertex_map_t::const_iterator node = _datanode_map.find(node_name);                  if (node != _datanode_map.end()) {                      boost::add_edge(gr_node, (*node).second, _expert_dag); @@ -423,7 +422,7 @@ private:              boost::depth_first_search(_expert_dag, boost::visitor(cdet_vis));              if (not back_edges.empty()) {                  std::string edges; -                BOOST_FOREACH(const std::string& e, back_edges) { +                for(const std::string& e:  back_edges) {                      edges += "* " + e + "";                  }                  throw uhd::runtime_error("Cannot resolve expert because it has at least one cycle!\n" @@ -514,7 +513,7 @@ private:      {          std::string indents;          for (size_t i = 0; i < depth; i++) indents += "- "; -        UHD_MSG(fastpath) << "[expert::" + _name + "] " << indents << str << std::endl; +        UHD_LOG_DEBUG("EXPERT","[expert::" + _name + "] " << indents << str)      }  private: diff --git a/host/lib/experts/expert_nodes.hpp b/host/lib/experts/expert_nodes.hpp index 6040cd19e..4a285cc80 100644 --- a/host/lib/experts/expert_nodes.hpp +++ b/host/lib/experts/expert_nodes.hpp @@ -23,7 +23,6 @@  #include <uhd/utils/dirty_tracked.hpp>  #include <uhd/types/time_spec.hpp>  #include <boost/function.hpp> -#include <boost/foreach.hpp>  #include <boost/thread/recursive_mutex.hpp>  #include <boost/thread.hpp>  #include <boost/units/detail/utility.hpp> @@ -409,7 +408,7 @@ namespace uhd { namespace experts {          // Worker node specific          std::list<std::string> get_inputs() const {              std::list<std::string> retval; -            BOOST_FOREACH(data_accessor_t* acc, _inputs) { +            for(data_accessor_t* acc:  _inputs) {                  retval.push_back(acc->node().get_name());              }              return retval; @@ -417,7 +416,7 @@ namespace uhd { namespace experts {          std::list<std::string> get_outputs() const {              std::list<std::string> retval; -            BOOST_FOREACH(data_accessor_t* acc, _outputs) { +            for(data_accessor_t* acc:  _outputs) {                  retval.push_back(acc->node().get_name());              }              return retval; @@ -442,14 +441,14 @@ namespace uhd { namespace experts {          // Graph resolution specific          virtual bool is_dirty() const {              bool inputs_dirty = false; -            BOOST_FOREACH(data_accessor_t* acc, _inputs) { +            for(data_accessor_t* acc:  _inputs) {                  inputs_dirty |= acc->node().is_dirty();              }              return inputs_dirty;          }          virtual void mark_clean() { -            BOOST_FOREACH(data_accessor_t* acc, _inputs) { +            for(data_accessor_t* acc:  _inputs) {                  acc->node().mark_clean();              }          }  | 
