Skip to content

Commit

Permalink
Drop cub::Mutex
Browse files Browse the repository at this point in the history
Fixes: #3250
  • Loading branch information
bernhardmgruber committed Jan 7, 2025
1 parent 8627ba5 commit 6f243d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 73 deletions.
70 changes: 0 additions & 70 deletions cub/cub/host/mutex.cuh

This file was deleted.

6 changes: 3 additions & 3 deletions thrust/thrust/system/cuda/detail/core/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,23 +402,23 @@ THRUST_RUNTIME_FUNCTION typename get_plan<Agent>::type get_agent_plan(int ptx_ve
# ifdef __CUDA_ARCH__
plan = get_agent_plan_dev<Agent>();
# else
static cub::Mutex mutex;
static std::mutex mutex;
bool lock = false;
if (d_ptr == 0)
{
lock = true;
cudaGetSymbolAddress(&d_ptr, agent_plan_device);
}
if (lock)
mutex.Lock();
mutex.lock();
f<<<1,1,0,s>>>((AgentPlan*)d_ptr);
cudaMemcpyAsync((void*)&plan,
d_ptr,
sizeof(AgentPlan),
cudaMemcpyDeviceToHost,
s);
if (lock)
mutex.Unlock();
mutex.unlock();
cudaStreamSynchronize(s);
# endif
return plan;
Expand Down

0 comments on commit 6f243d5

Please sign in to comment.