First draft of a KHR for properties#980
Conversation
It seems to make sense to allow a property with a runtime-supplied value to be constexpr when the property value is a constant, at least for those properties whose values could potentially be constants. This is not the same as a compile-time constant property, though, because the type of the property still does not convey the value of the property. Likewise, it seems to make sense to add `constexpr` to the `properties` constructor, so that a `properties` can be declared as a constant when all of its properties are constant expressions.
Minimal C++20 header-only implementation of the compile-time properties extension: properties class with CTAD, 6 traits, support for runtime, compile-time and hybrid property kinds, plus queue properties and tests. My question was: I would like to create a minimal C++20 implementation for KhronosGroup/SYCL-Docs#980. You can start by gathering the C++ pieces found in the AsciiDoctor document and summarize it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
I have made an implementation of this with 5 variations with the help of Claude Code CLI Opus 4.6 1M tokens: https://github.com/SYCL/properties So it looks like using |
|
Some other ideas on clean interface https://github.com/qlibs/mp |
|
I love the idea of compile-time properties, but does Intel have a killer use-case for them right now? As I understand it, all the existing SYCL properties would remain "runtime properties" as described by this KHR. Also, in the "free function commands KHR", which now depends on this KHR, I can't immediately see a property that would be implemented as a compile-time property, unless I missed it? |
This is a WIP draft KHR for compile-time properties. The text of the KHR is not complete yet, and there are still some open issues, but I think it's far enough along to start getting feedback.
The open issues at the bottom refer to "the POC". This is a POC implementation of this KHR which I wrote only to flesh out ideas. For those who are interested, the POC is available at intel/llvm#21368.