This is an archive of the discontinued LLVM Phabricator instance.

Add omp_pause_resource* API
ClosedPublic

Authored by tlwilmar on Nov 29 2018, 2:16 PM.

Details

Summary

Add omp_pause_resource and omp_pause_resource_all API and enum, plus stub for internal implementation. Implemented callable helper function to do local pause, and added basic functionality for hard and soft pause.

Diff Detail

Repository
rOMP OpenMP

Event Timeline

tlwilmar created this revision.Nov 29 2018, 2:16 PM
AndreyChurbanov added inline comments.Dec 5 2018, 9:41 AM
runtime/src/include/50/omp_lib.f.var
292

Parameters should be re-named as (kind, device_num). Because in Fortran user can provide named arguments, so we should use same names as in the specification.

299

Parameter "level" should be renamed to "kind" to correspond to the specification.

runtime/src/include/50/omp_lib.f90.var
308

Parameters should be re-named as (kind, device_num). Because in Fortran user can provide named arguments, so we should use same names as in the specification.

315

Parameter "level" should be renamed to "kind" to correspond to the specification.

runtime/src/include/50/omp_lib.h.var
340

Parameters should be re-named as (kind, device_num). Because in Fortran user can provide named arguments, so we should use same names as in the specification.

347

Parameter "level" should be renamed to "kind" to correspond to the specification.

tlwilmar updated this revision to Diff 181860.Jan 15 2019, 12:50 PM

Renamed parameters to match 5.0 spec. Added test.

This revision is now accepted and ready to land.Jan 16 2019, 3:31 AM
tlwilmar updated this revision to Diff 182111.Jan 16 2019, 11:58 AM
tlwilmar marked 6 inline comments as done.

Sorry Andrey -- I missed the Windows fix. Added now.

This revision was automatically updated to reflect the committed changes.
pawosm01 added a subscriber: pawosm01.EditedJan 21 2019, 6:59 AM

This commit causes Flang unit tests to fail.

openmp/trunk/runtime/src/include/50/omp_lib.h.var
143 ↗(On Diff #182117)

These three lines are too long causing OpenMP test cases from Flang fortran compiler to fail. See how this problem is addressed in the lines above and below.

pawosm01 reopened this revision.Jan 21 2019, 6:59 AM

Please correct.

This revision is now accepted and ready to land.Jan 21 2019, 6:59 AM
pawosm01 requested changes to this revision.Jan 21 2019, 7:00 AM
This revision now requires changes to proceed.Jan 21 2019, 7:00 AM
openmp/trunk/runtime/src/include/50/omp_lib.h.var
143 ↗(On Diff #182117)

Paul, sorry about that. I've missed on review that these lines exceed 72 chars.
Now fixed by commit rL351745.

pawosm01 accepted this revision.Jan 21 2019, 8:03 AM

It's ok, works for me now.

This revision is now accepted and ready to land.Jan 21 2019, 8:03 AM
kkwli0 added a subscriber: kkwli0.Jan 21 2019, 8:03 AM
kkwli0 added inline comments.
openmp/trunk/runtime/src/include/50/omp_lib.h.var
44 ↗(On Diff #182117)

Should use the same syntax (declaration + parameter statement) as the others in this file.

143 ↗(On Diff #182117)

declaration + parameter statement

pawosm01 closed this revision.Jan 21 2019, 8:04 AM
AndreyChurbanov marked an inline comment as done.Jan 21 2019, 8:14 AM
AndreyChurbanov added inline comments.
openmp/trunk/runtime/src/include/50/omp_lib.h.var
44 ↗(On Diff #182117)

Sure, fixed this as well.

Thanks, Kelvin.