Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brodeynewman committed Dec 15, 2024
1 parent 516909a commit e6ec613
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,21 +261,16 @@ void allocate_unified_mem_pointer(const int index, void *dev_ptr, void *ptr, siz

void* maybe_get_cached_arg_ptr(const int index, void* arg_ptr)
{
int found = -1;
for (int i = 0; i < conns[index].mem_idx; i++)
{
// index 1 is host pointer
if (conns[index].unified_mem_pointers[i][1] == arg_ptr)
{
found = i;
return &conns[index].unified_mem_pointers[i][0];
}
}

// no matching host pointer found
if (found < 0)
return nullptr;

return &conns[index].unified_mem_pointers[found][0];
return nullptr;
}

void cuda_memcpy_unified_ptrs(const int index, cudaMemcpyKind kind)
Expand Down

0 comments on commit e6ec613

Please sign in to comment.