diff options
Diffstat (limited to 'include/grpc/support/useful.h')
-rw-r--r-- | include/grpc/support/useful.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/grpc/support/useful.h b/include/grpc/support/useful.h index 003e096cf9..9d8314e4be 100644 --- a/include/grpc/support/useful.h +++ b/include/grpc/support/useful.h @@ -74,4 +74,7 @@ #define GPR_ICMP(a, b) ((a) < (b) ? -1 : ((a) > (b) ? 1 : 0)) +#define GPR_HASH_POINTER(x, range) \ + ((((size_t)x) >> 4) ^ (((size_t)x) >> 9) ^ (((size_t)x) >> 14)) % (range) + #endif /* GRPC_SUPPORT_USEFUL_H */ |