Skip to content

Conversation

bagrorg
Copy link
Collaborator

@bagrorg bagrorg commented Jul 12, 2022

No description provided.

@bagrorg bagrorg changed the title Groupby branch +Perfect GroupBy and some old GroupBy algos changes Jul 12, 2022
@bagrorg bagrorg marked this pull request as draft July 12, 2022 12:28
@bagrorg bagrorg marked this pull request as ready for review August 23, 2022 13:47
@bagrorg bagrorg requested a review from kurapov-peter August 23, 2022 13:48
@@ -91,7 +91,8 @@ void PerfectGroupBy::_run(const size_t buf_size, Meter &meter) {
h.single_task<class clean>([=]() {
for (size_t i = 0; i < groups_count * threads_count; i++) {
ht_v[i] = 0;
o[i] = 0;
if (i < groups_count)
o[i] = 0;
Copy link
Owner

Choose a reason for hiding this comment

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

What's the logic behind this one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here we want to clear all output from previous iteration using single_task
However, groups_count * threads_count may be bigger than output array size, so we need to control it to prevent SEGFAULT
This is not so clear, I wanted to do it in one for loop, but is it better to separate this two operations into two single_tasks?

Copy link
Owner

Choose a reason for hiding this comment

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

I guess no big difference since it's a single task

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.

2 participants