holoscan::ServiceKeyHash

Beta
View as Markdown

Hash function for ServiceKey to enable use in hash-based containers.

This functor provides a hash function for ServiceKey objects, allowing them to be used as keys in std::unordered_map and similar containers.

#include <holoscan/fragment_service.hpp>

Methods

operator()

std::size_t holoscan::ServiceKeyHash::operator()(
const ServiceKey &key
) const noexcept

Compute hash value for a ServiceKey.

The hash is computed by XORing the hashes of the type_index and string id.

Returns: Hash value for the key.

Parameters

key
const ServiceKey &

The ServiceKey to hash.