hash kernel subproblem dimensions
| 91 | |
| 92 | // hash kernel subproblem dimensions |
| 93 | static unsigned long |
| 94 | kernHash(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 |
| 111 | static int |
no test coverage detected