intel / intel/yarpgen

yarpgen support pragma omp simd

Open
#202 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
570
Forks
65
PR merge metrics
No merged PRs in 30d

Description

I used the Yargen tool and found a bug in the tool.

wrong code:
void test(int *acc, int *inc) {
#pragma omp simd
for (int i = 0; i < 16; i++)
*acc += *inc;
}

OK code:
void test(int *acc, int *inc) {
#pragma omp simd reduction(+:acc[0])
for (int i = 0; i < 16; i++)
*acc += *inc;
}
The absence of the "reduction" keyword leads to undefined behavior in this test case.

Who knows how to solve this problem?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.