r211589 - [OPENMP] Additional checking for 'collapse' clause.
Hal Finkel
hfinkel at anl.gov
Tue Jun 24 11:58:23 PDT 2014
----- Original Message -----
> From: "Alexey Bataev" <a.bataev at hotmail.com>
> To: cfe-commits at cs.uiuc.edu
> Sent: Tuesday, June 24, 2014 7:55:57 AM
> Subject: r211589 - [OPENMP] Additional checking for 'collapse' clause.
>
> Author: abataev
> Date: Tue Jun 24 07:55:56 2014
> New Revision: 211589
>
> URL: http://llvm.org/viewvc/llvm-project?rev=211589&view=rev
> Log:
> [OPENMP] Additional checking for 'collapse' clause.
>
[snip]
>
> +namespace {
> +struct OMPCollapseClauseFilter {
> + OMPCollapseClauseFilter() {}
> + bool operator()(const OMPClause *C) {
> + return C->getClauseKind() == OMPC_collapse;
> + }
> +};
> +} // namespace
Can we use a lambda for this?
> +
> +static Expr *GetCollapseNumberExpr(ArrayRef<OMPClause *> Clauses) {
> +
> OMPExecutableDirective::filtered_clause_iterator<OMPCollapseClauseFilter>
> I(
> + Clauses);
> + if (I)
> + return cast<OMPCollapseClause>(*I)->getNumForLoops();
> + return nullptr;
> +}
> +
-Hal
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the cfe-commits
mailing list