Skip to content

Commit 06c920e

Browse files
bernhardmgruberdavebayer
authored andcommitted
Drop cub::Mutex (NVIDIA#3251)
Fixes: NVIDIA#3250
1 parent 465b0ed commit 06c920e

File tree

2 files changed

+3
-73
lines changed

2 files changed

+3
-73
lines changed

cub/cub/host/mutex.cuh

Lines changed: 0 additions & 70 deletions
This file was deleted.

thrust/thrust/system/cuda/detail/core/util.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,23 +402,23 @@ THRUST_RUNTIME_FUNCTION typename get_plan<Agent>::type get_agent_plan(int ptx_ve
402402
# ifdef __CUDA_ARCH__
403403
plan = get_agent_plan_dev<Agent>();
404404
# else
405-
static cub::Mutex mutex;
405+
static std::mutex mutex;
406406
bool lock = false;
407407
if (d_ptr == 0)
408408
{
409409
lock = true;
410410
cudaGetSymbolAddress(&d_ptr, agent_plan_device);
411411
}
412412
if (lock)
413-
mutex.Lock();
413+
mutex.lock();
414414
f<<<1,1,0,s>>>((AgentPlan*)d_ptr);
415415
cudaMemcpyAsync((void*)&plan,
416416
d_ptr,
417417
sizeof(AgentPlan),
418418
cudaMemcpyDeviceToHost,
419419
s);
420420
if (lock)
421-
mutex.Unlock();
421+
mutex.unlock();
422422
cudaStreamSynchronize(s);
423423
# endif
424424
return plan;

0 commit comments

Comments
 (0)