using memcmp from within device code CUDA
===

I am using uthash (http://uthash.sourceforge.net/) for hash table implementation in my CUDA C program.

I have a bunch of keys say allkeys[100]. What I would like to do is, perform a parallel hash table look up using those 100 keys on the hash table and return a result array called results[100]. Basically launch a grid with xdimension as 100 and each block with perform one hash table lookup and store it in the result array.

Therefore what I have tried so far is, cudMalloc the hashtable on the device memory (no. of entries in hash table X size of one struct defining one hash table entry with a handle)
Then I cudaMemcpy the host hashtable to device hash table.

However, in my "__device__ searchhashtable(int key) function I get a error saying "error calling host function memcmp __device__ __global__ function".

I went through uthash.h implementation as can see that it uses the string.h library and in particulary fails at the memcmp function.

Whats the best way to handle this ?