Page MenuHomePhabricator

opencl-c.h: add initial CL 3.0 conditionals for atomic operations.

Authored by airlied on Jul 15 2021, 4:45 PM.



This adds the optional wrappers around things, however this isn't sufficient yet for CL 3.0 without generic address space, I've got one more additional patch to add all those APIs, but this is an easier to review precursor.

Diff Detail

Event Timeline

airlied created this revision.Jul 15 2021, 4:45 PM
airlied requested review of this revision.Jul 15 2021, 4:45 PM
Anastasia accepted this revision.Jul 19 2021, 3:11 PM

LGTM. Thanks!

This revision is now accepted and ready to land.Jul 19 2021, 3:11 PM

CC @azabaznov in case he has any feedback.

You also need to guard memory_order_seq_cst enum entry. Note that memory_order_acq_rel is always defined as it can be used in atomic_work_item_fence() built-in function, AFAIR in all other cases if memory_order_acq_rel is used without __opencl_c_atomic_order_acq_rel feature it is undefined behavior.

airlied updated this revision to Diff 360349.Jul 20 2021, 8:32 PM

add conditional around memory_order_seq_cst

This revision was landed with ongoing or failed builds.Jul 25 2021, 6:06 PM
This revision was automatically updated to reflect the committed changes.