geopm_hash(3) – helper methods for encoding

Synopsis

#include <geopm_hash.h>

Link with -lgeopmd

uint64_t geopm_crc32_str(const char *key);

Description

The geopm_hash.h header defines GEOPM interfaces for encoding region names into 64-bit integers and working with 64-bit integer values stored as doubles.

geopm_crc32_str()

Hashes the string key to produce a 64-bit value. This function is used to produce unique region IDs for named regions. An Agent implementation with specialized behavior for specific region names can use this function to figure out the region ID to expect for the desired region. Only the bottom 32 bits will be filled in, reserving the top 32 bits for hints and other information.

See Also

geopm(7), geopm::PlatformIO(3)