summaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/master_taskloop_reduction_messages.cpp
AgeCommit message (Collapse)Author
2023-07-20[OpenMP][Reduction] Allow PLUS (+) operator on reduction clauses in OMP > 52Fazlay Rabbi
Currently, clang gives an incorrect reduction identifier error for the PLUS operator for OpenMP version > 52. But, PLUS operator is allowed in OpenMP version > 52. This revision fixes this issue and also modified the error messages to show the correct expected operators in the message based on the OpenMP version used (prior to OMP 6.0 and since OMP 6.0). Test Src: void foo() { int a = 0 ; #pragma omp parallel reduction(+:a) ; #pragma omp parallel reduction(-:a) ; } Before this revision: $ clang -fopenmp -fopenmp-version=60 test.c -c test.c:3:34: error: incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int' 3 | #pragma omp parallel reduction(+:a) | ^ test.c:5:34: error: incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int' 5 | #pragma omp parallel reduction(-:a) | ^ 2 errors generated. Wit this revision: $ clang -fopenmp -fopenmp-version=60 test.c -c test.c:5:34: error: incorrect reduction identifier, expected one of '+', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int' 5 | #pragma omp parallel reduction(-:a) | 1 error generated. Differential Revision: https://reviews.llvm.org/D155635
2023-05-18[OpenMP 5.2] Deprecate MINUS(-) operator on 'reduction' clauseFazlay Rabbi
2021-05-11[OpenMP] Use compound operators for reduction combiner if available.Mike Rice
The OpenMP spec seems to require the compound operators be used for +, *, &, |, and ^ reduction. So use these if a class has those operators. If not try the simple operators as we did previously to limit the impact to existing code. Fixes: https://bugs.llvm.org/show_bug.cgi?id=48584 Differential Revision: https://reviews.llvm.org/D101941
2020-08-27[OpenMP] Ensure testing for versions 4.5 and default - Part 3Saiyedul Islam
This third patch in the series removes version 5.0 string from test cases making them check for default version. It also add test cases for version 4.5. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D85214
2020-05-07[OPENMP]Consider 'omp_null_allocator' as a predefined allocator.Alexey Bataev
Summary: omp.h header file defines omp_null_allocator as a predefined allocator, need to consider it also as a predefined allocator. Reviewers: jdoerfert Subscribers: jholewinski, yaxunl, guansong, cfe-commits, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D79186
2020-04-30[OPENMP50]Support 'task' modifier in reduction clauses.Alexey Bataev
Summary: Added basic support for 'task' modifier in the reduction clauses in non-simd parallel and worksharing constructs. Reviewers: jdoerfert Subscribers: yaxunl, guansong, cfe-commits, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D78738
2019-10-10[OPENMP50]Support for 'master taskloop' directive.Alexey Bataev
Added full support for master taskloop directive. llvm-svn: 374437