compute-runtime icon indicating copy to clipboard operation
compute-runtime copied to clipboard

refactor: replaced push to emplace C++11 for stl containers

Open GermanAizek opened this issue 1 year ago • 4 comments

GermanAizek avatar Jan 01 '25 14:01 GermanAizek

What is motivation for this change?

emplace causes issues with some compilers. Even recently we switched one emplace to insert https://github.com/intel/compute-runtime/commit/1110410caf7dc838c35c6693fa42cd54bf38f2d3

JablonskiMateusz avatar Jan 08 '25 14:01 JablonskiMateusz

What is motivation for this change?

The motivation is completely identical to this PR: https://github.com/intel/media-driver/pull/1875#issue-2631448370 In some compilers, it has little effect on insertion elements speed, and it's also just more beautiful and modern C++.

GermanAizek avatar Jan 08 '25 19:01 GermanAizek

emplace causes issues with some compilers. Even recently we switched one emplace to insert 1110410

@JablonskiMateusz, Ok thanks for more detailed info. I revert replace changes described in this commit.

GermanAizek avatar Jan 08 '25 19:01 GermanAizek

@JablonskiMateusz, regress changes from https://github.com/intel/compute-runtime/commit/1110410caf7dc838c35c6693fa42cd54bf38f2d3 not on my PR commits.

GermanAizek avatar Jan 10 '25 21:01 GermanAizek