parallel-runtimes / lomp

Little OpenMP Library
Apache License 2.0
153 stars 17 forks source link

Fix two warnings. #29

Closed JimCownie closed 3 years ago

JimCownie commented 3 years ago

Fix two warnings in tasking code. In storeTask I simplified the logic a little as well.

JimCownie commented 3 years ago

We should run it through the source formatter, then it’ll be canonical. That used to work with “make”; not sure what happened with cmake...

On 4 Aug 2021, at 11:50, Michael Klemm @.***> wrote:

@mjklemm approved this pull request.

Looks good to me.

In src/tasking.cc https://github.com/parallel-runtimes/lomp/pull/29#discussion_r682505142:

// Try to put the task into the pool.

  • if (!taskPool->put(task)) {
  • if (taskPool->put(task)) {
  • return true;
  • } else { ⬇️ Suggested change
  • } else {
  • }
  • else { In src/tasking.cc https://github.com/parallel-runtimes/lomp/pull/29#discussion_r682505381:

    // Try to put the task into the pool.

  • if (!taskPool->put(task)) {
  • if (taskPool->put(task)) {
  • return true;
  • } else { Minor stylistic change. Otherwise, I'm good with the change.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/parallel-runtimes/lomp/pull/29#pullrequestreview-722137223, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY7TVEEESPZXOUMUHSFQA3T3ELO5ANCNFSM5BQY6Z6Q. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

-- Jim James Cownie @.***> Mob: +44 780 637 7146