Skip to content

Question about the meaning of slice_count and slice_idx in global reduction condition #41

@ZhengChen6

Description

@ZhengChen6

Hi, thanks a lot for your great work!

I have a question regarding the following piece of code:

if (slice_count > 1) { // only globally reduce if there is more than one block in a slice
    barrier_acquire(&locks[slice_col], slice_idx);
    global_reduce(slice_idx == 0, last);
    barrier_release(&locks[slice_col], last);
}

According to the comment, it seems that slice_count is meant to represent the number of blocks in a slice. However, from my understanding, slice_count actually refers to the number of slices in a column (i.e., how many slices there are in one column).
Could you please clarify what slice_count exactly represents here? Is it the number of blocks in a slice, or the number of slices in a column?

I also have a question about the variable slice_idx: does it indicate which slice (by index) this is within the current column?

Thanks in advance for your time and clarification!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions