[Openmp-commits] [PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.
Peixin Qiao via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 13 23:00:07 PST 2022
peixin added a comment.
Herald added a subscriber: awarzynski.
@Meinersbur Here is the c++ code test. Without the chunk size specified, the running result using OMPIRBuilder is correct.
#include<iostream>
int main() {
int i, N = 10;
float x = 0.0;
#pragma omp for schedule(static, 2)
for(i = 3; i <= N; i++) {
x = x + i;
}
std::cout << "x = " << x << std::endl;
return 0;
}
$ clang++ chunk-1.cpp -fopenmp -fopenmp-enable-irbuilder && ./a.out
x = 7
$ clang++ chunk-1.cpp -fopenmp && ./a.out
x = 52
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114413/new/
https://reviews.llvm.org/D114413
More information about the Openmp-commits
mailing list