-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][ESIMD][EMU] Clearing unused function arguments in PI module #6033
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][ESIMD][EMU] Clearing unused function arguments in PI module #6033
Conversation
…odule" This reverts commit 3d476c6.
- ARG_PTR_UNUSED triggers warnings
@@ -66,7 +66,7 @@ pi_result getInfoImpl(size_t ParamValueSize, void *ParamValue, | |||
template <typename T> | |||
pi_result getInfo(size_t ParamValueSize, void *ParamValue, | |||
size_t *ParamValueSizeRet, T Value) { | |||
auto assignment = [](void *ParamValue, T Value, size_t ValueSize) { | |||
auto assignment = [](void *ParamValue, T Value, size_t) { |
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 remember any agreement on this. So, this may be Ok.
In those cases where the type does not describe the parameter it is ok to omit the name, on other like 'size_t' it may be still good to have a name in comment section. For example:
auto assignment = [](void *ParamValue, T Value, size_t) { | |
auto assignment = [](void *ParamValue, T Value, size_t /*ValueSize*/) { |
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.
In other plug-in implementations, (void)XXX;
is used. I introduced ARG_UNUSED
macro for suppressing warning messages from unused arguments.
pi_result piEventGetProfilingInfo(pi_event, pi_profiling_info, size_t, void *, | ||
size_t *) { |
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.
Because the function is not documented it may be good to have something like:
pi_result piEventGetProfilingInfo(pi_event, pi_profiling_info, size_t, void *, | |
size_t *) { | |
pi_result piEventGetProfilingInfo(pi_event, pi_profiling_info, size_t /*ParamValueSize*/, void */*ParamValue*/, | |
size_t */*ParamValueSizeRet*/) { |
This is clear/good fix. Replacing 'pi_device Device' with 'pi_device' is Ok, while replacing 'size_t *ParamVlaueSizeRet' with 'size_t *' seems like luck of information in the new code. |
@steffenlarsen, please review |
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.
LGTM!
Unrelated failure from 'OCL Gen9 LLVM Test Suite'
|
No description provided.