Skip to content

Conversation

@qezlou
Copy link
Collaborator

@qezlou qezlou commented Oct 24, 2024

  • Code compiles and a test in tests/cuv_sort.cu outputs a correct answer

HACK: combined Topkey, key into a single unit64_t.

  • This is to avoid using a struct with two uint32_t members. Which is not supported by cub::DeviceRadixSort::SortPairs.
  • TODO: use thrust::sort_by_key instead of cub::DeviceRadixSort::SortPairs

return child;
}

/* Remove garbage particles, holes in sph chunk, and holes in bh buffer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this function and the functions it calls from this file: no need to port it to gpu.

if (!SLOTS_ENABLED(ptype, sman))
continue;
// Sort the used ones by their location in the P array
qsort_openmp(sman->info[ptype].ptr,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we port this to cub::DeviceRadixSort as well?

- Code compiles and a test in tests/cuv_sort.cu outputs a correct answer

HACK: combined Topkey, key into a single unit64_t.
- This is to avoid using a struct with two uint32_t members. Which is not supported by cub::DeviceRadixSort::SortPairs.
- TODO: use `thrust::sort_by_key` instead of `cub::DeviceRadixSort::SortPairs`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants