MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / hash_bytes

Function hash_bytes

tensorflow/core/profiler/nvtx_utils.cc:51–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51inline size_t hash_bytes(const char* data, size_t size, size_t seed = 5381) {
52 for (size_t i = 0; i < size; ++i) seed = seed * 33 + *data++;
53 return seed;
54}
55
56inline uint32_t get_color(size_t hash) {
57 static constexpr const uint32_t colors[] = {

Callers 1

MakeAttributesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected