I have two ShaderStorageBufferObjects filled with unsigned integers. I'm trying to use thrust to sort these by keys (these two buffers pair together) Here is what I'm doing
    struct cudaGraphicsResource *cuda_keys, *cuda_values;
    thrust::device_ptr<uint> keys_device_ptr, values_device_ptr;
//CellIndexList and ParticleIndexList are my buffers and ID being their uint handle
cudaGraphicsGLRegisterBuffer(&cuda_keys, CellIndexList->GetID(), cudaGraphicsMapFlagsNone);
cudaGraphicsGLRegisterBuffer(&cuda_values, ParticleIndexList->GetID(), cudaGraphicsMapFlagsNone);
uint* keys_ptr, *values_ptr;
size_t keys_size, values_size;
{
//this code is being executed in a loop
    cudaGraphicsMapResources(1, &cuda_keys, 0);
    cudaGraphicsResourceGetMappedPointer((void **)&keys_ptr, &keys_size, cuda_keys);
    cudaGraphicsMapResources(1, &cuda_values,0);
    cudaGraphicsResourceGetMappedPointer((void**)&values_ptr, &values_size, cuda_values);
    keys_device_ptr = thrust::device_pointer_cast(keys_ptr);
    values_device_ptr = thrust::device_pointer_cast(values_ptr);
    thrust::sort_by_key(keys_device_ptr, keys_device_ptr + nParticles, values_device_ptr, thrust::less<uint>());
    cudaGraphicsUnmapResources(1, &cuda_keys, 0);
    cudaGraphicsUnmapResources(1, &cuda_values, 0);
}
I'm getting this "thrust::detail::STATIC_ASSERTION_FAILURE" in my compiler output.