From 4ddd6530895a895772e629281b88145ba304338a Mon Sep 17 00:00:00 2001 From: Bill Davis Date: Wed, 5 Aug 2020 10:26:40 -0500 Subject: utils: Change template specialization namespacing There is a gcc bug for template specialization that causes compile errors. Reformatting the namespacing avoids the bug. --- host/include/uhd/utils/chdr/chdr_packet.ipp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/utils/chdr/chdr_packet.ipp b/host/include/uhd/utils/chdr/chdr_packet.ipp index 866c9f93d..79019ad84 100644 --- a/host/include/uhd/utils/chdr/chdr_packet.ipp +++ b/host/include/uhd/utils/chdr/chdr_packet.ipp @@ -10,10 +10,10 @@ #include namespace chdr_rfnoc = uhd::rfnoc::chdr; -namespace chdr_util = uhd::utils::chdr; +namespace uhd { namespace utils { namespace chdr { template -chdr_util::chdr_packet::chdr_packet(uhd::rfnoc::chdr_w_t chdr_w, +chdr_packet::chdr_packet(uhd::rfnoc::chdr_w_t chdr_w, chdr_rfnoc::chdr_header header, payload_t payload, boost::optional timestamp, @@ -24,7 +24,7 @@ chdr_util::chdr_packet::chdr_packet(uhd::rfnoc::chdr_w_t chdr_w, } template -void chdr_util::chdr_packet::serialize( +void chdr_packet::serialize( OutputIterator first, OutputIterator last, uhd::endianness_t endianness) const { void* start = static_cast(&*first); @@ -33,7 +33,7 @@ void chdr_util::chdr_packet::serialize( } template -chdr_util::chdr_packet chdr_util::chdr_packet::deserialize(uhd::rfnoc::chdr_w_t chdr_w, +chdr_packet chdr_packet::deserialize(uhd::rfnoc::chdr_w_t chdr_w, InputIterator first, InputIterator last, uhd::endianness_t endianness) @@ -44,7 +44,7 @@ chdr_util::chdr_packet chdr_util::chdr_packet::deserialize(uhd::rfnoc::chdr_w_t } template -payload_t chdr_util::chdr_packet::get_payload(uhd::endianness_t endianness) const +payload_t chdr_packet::get_payload(uhd::endianness_t endianness) const { payload_t payload; // Only Data Packets are allowed to have end on a incomplete CHDR_W length. @@ -61,7 +61,7 @@ payload_t chdr_util::chdr_packet::get_payload(uhd::endianness_t endianness) cons } template -void chdr_util::chdr_packet::set_payload(payload_t payload, uhd::endianness_t endianness) +void chdr_packet::set_payload(payload_t payload, uhd::endianness_t endianness) { _header.set_pkt_type(chdr_rfnoc::payload_to_packet_type()); // Meaning a 64 bit word (The basic unit of data for payloads) @@ -78,7 +78,7 @@ void chdr_util::chdr_packet::set_payload(payload_t payload, uhd::endianness_t en } template -const std::string chdr_util::chdr_packet::to_string_with_payload( +const std::string chdr_packet::to_string_with_payload( uhd::endianness_t endianness) const { payload_t payload = this->get_payload(endianness); @@ -87,10 +87,12 @@ const std::string chdr_util::chdr_packet::to_string_with_payload( template <> const std::string -chdr_util::chdr_packet::to_string_with_payload( +chdr_packet::to_string_with_payload( uhd::endianness_t endianness) const { chdr_rfnoc::mgmt_payload payload = this->get_payload(endianness); return to_string() + payload.to_string() + payload.hops_to_string(); } + +}}}// namespace uhd::utils::chdr -- cgit v1.2.3