-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL] Implicit conversion from id<1> to size_t #939
Conversation
@AlexeySachkov ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see new functionality added by this patch in the spec.
We should inform developers that they use non-standard functionality (e.g. provide an option to disable non-portable extensions, add a compiler note/warning, etc.)
tagging @mkinsner, @jbrodman, @rolandschulz
Yes. It should only be enabled if all the verbosity/usability extensions are enabled. What's the status of adding a compiler switch to enable/disables extensions (#806)? |
#806 is about controlling language extensions, where this patch extends library API, which is supposed be configured via preprocessor definitions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I don't have objections against this patch, but let's guard non-standard things under #ifndef
, so users can disable them (don't forget to add test for this new macro)
sycl/include/CL/sycl/id.hpp
Outdated
return result; | ||
} | ||
|
||
operator size_t() const { return this->get(0); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please guard this new non-standard method with some preprocessor macro? Similar to how it is done in #974
It would be also good to have another one macro which allows to disable all non-standard features introduced by header files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added "SYCL_DISABLE_ID_TO_INT_CONV"
I still believe that the user doesn't care whether a language extension is implemented in the FE or in the library and would like to be able to use the same mechanism for both. Note that for C++ this works the same. If I use |
Right. But #806 should not block library development. |
Yes. I agree. |
Signed-off-by: Igor Dubinov <igor.dubinov@intel.com>
Implements id<1> -> size_t implicit conversion.
Signed-off-by: Igor Dubinov igor.dubinov@intel.com