MCPcopy Create free account
hub / github.com/baldurk/renderdoc / strhash

Function strhash

renderdoc/strings/string_utils.cpp:32–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include "os/os_specific.h"
31
32uint32_t strhash(const char *str, uint32_t seed)
33{
34 if(str == NULL)
35 return seed;
36
37 uint32_t hash = seed;
38 int c = *str;
39 str++;
40
41 while(c)
42 {
43 hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
44 c = *str;
45 str++;
46 }
47
48 return hash;
49}
50
51uint32_t strhash(const char *str)
52{

Callers 11

string_utils.cppFile · 0.85
InitEnumerateCountersMethod · 0.85
NvPmGatherCountersFunction · 0.85
addCounterMethod · 0.85
VulkanShaderCacheMethod · 0.85
GetSPIRVBlobMethod · 0.85
GetPipeCacheBlobMethod · 0.85
SetPipeCacheBlobMethod · 0.85
GetShaderBlobMethod · 0.85
GetShaderBlobMethod · 0.85
operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected