MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / kernHash

Function kernHash

src/library/common/kern_cache.c:93–108  ·  view source on GitHub ↗

hash kernel subproblem dimensions

Source from the content-addressed store, hash-verified

91
92// hash kernel subproblem dimensions
93static unsigned long
94kernHash(const SubproblemDim *subdims, unsigned int nrDims)
95{
96 unsigned int i;
97 unsigned long hash = 0;
98
99 for (i = 0; i < nrDims; i++) {
100 hash = updateHash(hash, (unsigned long)subdims[i].x);
101 hash = updateHash(hash, (unsigned long)subdims[i].y);
102 hash = updateHash(hash, (unsigned long)subdims[i].bwidth);
103 hash = updateHash(hash, (unsigned long)subdims[i].itemX);
104 hash = updateHash(hash, (unsigned long)subdims[i].itemY);
105 }
106
107 return (unsigned long)(hash * prime);
108}
109
110// comparison function to look for a kernel node in the cache
111static int

Callers 2

addKernelToCacheFunction · 0.85
findKernelFunction · 0.85

Calls 1

updateHashFunction · 0.85

Tested by

no test coverage detected