Page MenuHomePhabricator

[clang-tidy] new altera single work item barrier check
Needs ReviewPublic

Authored by ffrankies on Jan 5 2020, 7:31 PM.



This lint check is a part of the FLOCL (FPGA Linters for OpenCL) project out of the Synergy Lab at Virginia Tech.

FLOCL is a set of lint checks aimed at FPGA developers who write code in OpenCL.

The altera single work item barrier check finds OpenCL kernel functions that call a barrier function but do not call an ID function. These kernel functions will be treated as single work-item kernels, which could be inefficient or lead to errors.

Based on the "Altera SDK for OpenCL: Best Practices Guide."

Depends on due to the altera module being introduced there.

Diff Detail

Event Timeline

ffrankies created this revision.Jan 5 2020, 7:31 PM

I think will be good idea to separate module code in own review or refer to previous one of previous reviews as dependency.


const auto *.


Just IsNDRange. See readability-simplify-boolean-expr.


Please highlight 1600 with single back-quotes.

mgehre removed a subscriber: mgehre.Jan 5 2020, 10:59 PM
ffrankies updated this revision to Diff 243717.Mon, Feb 10, 7:38 PM
ffrankies marked 3 inline comments as done.

Implemented requested changes by @Eugene.Zelenko

  • Changed auto to const auto *
  • Changed if(IsNDRange == true) to if(IsNDRange)
  • Highlighted 1600 with single back-quotes
  • Added link to as a dependency in Summary (is there someplace else I can refer to that as a dependency?)