Skip to content

Consider swapping atomic for reduction for incrementing counters #14

@csoneson

Description

@csoneson

Using

#pragma omp parallel for reduction(+:varName)

instead of using

#pragma atomic
varName++

may be beneficial from a performance point of view. It's unclear what happens to varName if the for loop is executed multiple times (e.g. for different chunks) - will it be reinitialized to 0 each time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions