-
Notifications
You must be signed in to change notification settings - Fork 17
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
Excessive initialization in descriptor and completion_record #14
Comments
Hi @vinser52, I'm not sure that the I'm 99% sure that the excessive initialization will be optimized away for -O2, but if there is no requirement from C++ standard to zero-initialize class' array members as if |
Hi @EgorKupaev, you can refer to the following links:
Also, I have created a simple test program:
|
Hi @vinser52, as I can see this issue was opened a long time ago, so just checking in to see if it could be closed? |
Hi @mzhukova, I think the issue I raised was not resolved. |
The
descriptor
struct contains excessivebytes
array initialization in default ctor. I believe the following code can be safely removed: https://github.com/intel/DML/blob/develop/include/dml/detail/common/types.hpp#L21-L24. Thebytes
array is zero-initialized.The same is also applicable for
completion_record
.I am not sure about performance impact - I hope compiler will optimize it out when compiled with -O2.
The text was updated successfully, but these errors were encountered: