Skip to content

Conversation

@maximdimakov
Copy link
Contributor

@maximdimakov maximdimakov commented Sep 8, 2021

Add default constexpr constructor for half and host half classes, and also for half_vec struct.
Due to bitselect built-in uses union with half specialization, but object of a class without trivial constructor cannot be a member of union, the builtins_helper struct was added. This struct allow to use host half class instead of main half class in the builtin.

Signed-off-by: mdimakov maxim.dimakov@intel.com

…elect

Signed-off-by: mdimakov <maxim.dimakov@intel.com>
@dm-vodopyanov
Copy link
Contributor

@maximdimakov, please add tests.
Also, can you please add info about builtins_helper from description to comments in the code?

@maximdimakov
Copy link
Contributor Author

maximdimakov commented Sep 10, 2021

@dm-vodopyanov I added clarifying comments and tests

@maximdimakov
Copy link
Contributor Author

@AlexeySachkov @dm-vodopyanov could you, please, review?

@dm-vodopyanov dm-vodopyanov merged commit d32a444 into intel:sycl Sep 13, 2021
romanovvlad pushed a commit that referenced this pull request Oct 4, 2021
Return trivial default constructor to half type. Without
default constructor it is impossible to create union with
half type. Changed implementation of marray and
half_vec constructors for optimizing them to use half
with trivial default constructor. Update files accordingly
to returned half trivial default constructor.
This patch corrects #4518

Signed-off-by: mdimakov maxim.dimakov@intel.com
@maximdimakov maximdimakov deleted the half_ctor branch March 24, 2022 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants