This merging routine requires functionality to sort a GPU vector based on another GPU vector's values. The heap-sort functions below were obtained from https://www.geeksforgeeks.org/iterative-heap-sort/ and modified for the current purpose. It achieves the same as.
More...
This merging routine requires functionality to sort a GPU vector based on another GPU vector's values. The heap-sort functions below were obtained from https://www.geeksforgeeks.org/iterative-heap-sort/ and modified for the current purpose. It achieves the same as.
std::sort(
sorted_indices_data + cell_start, sorted_indices_data + cell_stop,
[&momentum_bin_number_data](size_t i1, size_t i2) {
return momentum_bin_number_data[i1] < momentum_bin_number_data[i2];
}
);
but with support for device execution.