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 3740492 commit 516909a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,10 @@ void* maybe_get_cached_arg_ptr(const int index, void* arg_ptr)
}
}

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

// @TODO: this is currently very naive. it depends on the ordering of the args passed to launchKernel...
// to be the same order that the memory addresses are allocated.
// expand on this soon. - brodey
return &conns[index].unified_mem_pointers[found][0];
}

Expand Down
2 changes: 1 addition & 1 deletion test/unified.cu
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ int main() {
// Unified memory allocation
int *a, *c;

cudaMallocManaged(&a, bytes);
cudaMallocManaged(&c, bytes);
cudaMallocManaged(&a, bytes);

// Initialize arrays on the CPU
for (int i = 0; i < size; ++i) {
Expand Down

0 comments on commit 516909a

Please sign in to comment.