Skip to content

replace this with std::exclusive_scan #248

@jacobmerson

Description

@jacobmerson

The clarity of this could be improved by making use of the standard algorithms library for std::exclusive_scan

EntOffsetsArray offsets{};
size_t offset = 0;
for (size_t i = 0; i < offsets.size(); ++i) {
offsets[i] = offset;
if (i <= static_cast<size_t>(mesh_.dim()) && nodes_per_dim_[i])
offset += mesh_.nents(i);
}
offsets[offsets.size() - 1] = offset;
return offsets;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions