Page MenuHomePhabricator

[OpenCL] Add version handling for builtin functions
Needs ReviewPublic

Authored by Pierre on Jun 18 2019, 10:38 AM.



This patch allows to set a MinVersion, stating from which OpenCL version
a function is available, and a MaxVersion, stating the version from which
a function should not be available anymore.
Definitions of the "work-item" functions have been updated, and some of
the "vector data load and store" functions (e.g.: vload/vstore) have been
added to show use of versions.

This depends on:
-1, splitting opencl-c.h file:
-2, Adding generic types:
-3, Adding const, volatile and pointer types:
-4, Adding image types:

Diff Detail

Event Timeline

Pierre created this revision.Jun 18 2019, 10:38 AM
Anastasia added inline comments.Jul 1 2019, 8:02 AM

Would it make sense to rename this to CLAny or CLAll instead? Although do we even need to add a name for this or may be rather keep as numeric value representing default initialization?


Table 15 from?


This should also work in CL2 right?

Pierre updated this revision to Diff 207349.Jul 1 2019, 9:21 AM
Pierre marked 4 inline comments as done.

Corrections on names, wrong OpenCL versions in comment, missing comma ...


Indeed, it makes more sense to rename it CLAny or CLAll. It also might be possible not to define this version (and not to give a name). I would prefer to use a name though. I changed it to CLAll for now.


This is from OpenCL v2.0 s6.13.7. This was just a hint to help find back the definition in the specification. I didn't want to have too many ornaments around these hints. Should I give the exact chapter each time?


This is correct, I removed the condition.

Pierre updated this revision to Diff 207811.Jul 3 2019, 9:02 AM

Rebase on previous patches.

Pierre updated this revision to Diff 208347.Jul 8 2019, 3:12 AM