MCPcopy Create free account
hub / github.com/clMathLibraries/clSPARSE / rsHash

Method rsHash

src/library/internal/kernel-cache.cpp:198–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197
198unsigned int KernelCache::rsHash(const std::string &key)
199{
200 unsigned int b = 378551;
201 unsigned int a = 63689;
202 unsigned int hash = 0;
203 unsigned int i = 0;
204
205 auto len = key.size();
206
207 for (i = 0; i < len; i++)
208 {
209 hash = hash * a + key[i];
210 a = a * b;
211 }
212
213 return hash;
214
215}

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected