Skip to content

Conversation

dm-vodopyanov
Copy link
Contributor

@dm-vodopyanov dm-vodopyanov commented May 27, 2020

Implementing SYCL_INTEL_bitcast extension which reinterprets the bits of an object as an object of a different data type calling the sycl::detail::bit_cast function. This function has the same specification as std::bit_cast, defined by C++20.
sycl::detail::bit_cast calls std::bit_cast if __cpp_lib_bit_cast macro is enabled, otherwise, it calls __builtin_bit_cast builtin for oneAPI Data Parallel C++ compiler and sycl::detail::memcpy function for other compilers.

@dm-vodopyanov dm-vodopyanov requested review from AlexeySachkov, Pennycook and a team as code owners May 27, 2020 14:34
@dm-vodopyanov dm-vodopyanov requested a review from s-kanaev May 27, 2020 14:35
Copy link
Contributor

@AlexeySachkov AlexeySachkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any major objections, but would like to hear feedback from @Pennycook

@romanovvlad
Copy link
Contributor

Please, do not forget to update sycl/doc/extensions/README.md with a new status of this extension.

@romanovvlad
Copy link
Contributor

romanovvlad commented May 27, 2020

Could you please add a little bit more information in the commit message: what bitcast does and what it is lowered to depending on the compiler used.

Signed-off-by: Dmitry Vodopyanov <[email protected]>
@dm-vodopyanov
Copy link
Contributor Author

@romanovvlad, done.

AlexeySachkov
AlexeySachkov previously approved these changes May 28, 2020
Pennycook
Pennycook previously approved these changes May 28, 2020
s-kanaev
s-kanaev previously approved these changes May 29, 2020
Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dm-vodopyanov
Copy link
Contributor Author

@jbrodman, @mkinsner could you please review?

@dm-vodopyanov dm-vodopyanov requested a review from s-kanaev June 1, 2020 13:56
Pennycook
Pennycook previously approved these changes Jun 1, 2020
Copy link
Contributor

@Pennycook Pennycook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for making all the changes.

@dm-vodopyanov dm-vodopyanov changed the title [SYCL] Add sycl::bit_cast extension implementation [SYCL] Add sycl::detail::bit_cast implementation Jun 1, 2020
Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bader
Copy link
Contributor

bader commented Jun 3, 2020

@dm-vodopyanov, could you update the description, please? I think it's doesn't exactly match the patch.

@dm-vodopyanov
Copy link
Contributor Author

@bader thanks, found a mistake in description (renamed sycl::intel::bit_cast to sycl::detail::bit_cast). Everything else looks good for me. If something else should be added/removed, please tell me.

@bader bader merged commit e3da4ef into intel:sycl Jun 3, 2020
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.

9 participants