52 return !(*
this == rhs);
58 const std::string type_repr =
type ==
USER ?
"USER"
62 return type_repr +
":" + std::to_string(
instance);
84struct hash<uhd::rfnoc::res_source_info>
86 size_t operator()(
const uhd::rfnoc::res_source_info& src_info)
const
88 const size_t hash_type = std::hash<size_t>{}(src_info.
type);
89 const size_t hash_inst = std::hash<size_t>{}(src_info.
instance);
90 return hash_type ^ (hash_inst << 1);
#define UHD_ASSERT_THROW(code)
Definition exception.hpp:321
Definition actions.hpp:25
Definition build_info.hpp:12
bool operator!=(const res_source_info &rhs) const
Definition res_source_info.hpp:50
size_t instance
Definition res_source_info.hpp:43
bool operator==(const res_source_info &rhs) const
Definition res_source_info.hpp:45
source_t type
The type of source (user or edge).
Definition res_source_info.hpp:38
source_t
Definition res_source_info.hpp:21
@ INPUT_EDGE
An input edge sources this resource.
Definition res_source_info.hpp:23
@ FRAMEWORK
This is a special resource, only accessed by the framework.
Definition res_source_info.hpp:25
@ OUTPUT_EDGE
An input edge sources this resource.
Definition res_source_info.hpp:24
@ USER
The user API sources this resource.
Definition res_source_info.hpp:22
res_source_info(source_t source_type, size_t instance_=0)
Definition res_source_info.hpp:31
static source_t invert_edge(const source_t edge_direction)
Definition res_source_info.hpp:73
std::string to_string() const
Returns a string representation of the source.
Definition res_source_info.hpp:56