Skip to content

[SYCL][NFC] Improve type traits' usage in headers & runtime #2768

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

Merged
merged 2 commits into from
Nov 16, 2020

Conversation

AGindinson
Copy link
Contributor

@AGindinson AGindinson commented Nov 13, 2020

The patch aims to:

  1. Facilitate consistent usage of type traits accross the SYCL library.
  2. Make a potential switch to C++14 STL type traits easier to perform.

The following traits were affected:

  • enable_if
  • remove_const
  • remove_reference
  • conditional
  • remove_pointer
  • remove_cv

An overview of the changes:

  1. Wherever possible, std::[trait]<>::type usages were replaced with detail::[trait]_t<>.
  2. The corresponding std::[trait]_t<> usages were also replaced, as we're still supposed to comply with C++11.
  3. The type traits-related #include directives were slightly re-organized with some removal of obsolete ones.
  4. Some duplicating code was removed from detail/stl_type_traits.hpp.

Signed-off-by: Artem Gindinson [email protected]

@AGindinson AGindinson force-pushed the private/agindins/templates-refactor branch 2 times, most recently from 1f535fa to 3bcf70c Compare November 13, 2020 00:48
The patch aims to:
1. Facilitate consistent usage of type traits accross the SYCL library.
2. Make a potential switch to C++14 STL type traits easier to perform.

The following traits were affected:
- `enable_if`
- `remove_const`
- `remove_reference`
- `conditional`
- `remove_pointer`
- `remove_cv`

An overview of the changes:
1. Wherever possible, `std::[trait]<>::type` usages were replaced with
`detail::[trait]_t<>`.
2. The corresponding `std::[trait]_t<>` usages were also replaced, as we're
still supposed to comply with C++11.
3. The type traits-related `#include` directives were slightly re-organized with
some removal of obsolete ones.
4. Some duplicating code was removed from `detail/stl_type_traits.hpp`.

Signed-off-by: Artem Gindinson <[email protected]>
@AGindinson AGindinson force-pushed the private/agindins/templates-refactor branch from 49dda7b to 8b7f89c Compare November 13, 2020 11:03
Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@turinevgeny turinevgeny left a comment

Choose a reason for hiding this comment

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

LGTM.

@againull againull merged commit b469f03 into intel:sycl Nov 16, 2020
jsji pushed a commit that referenced this pull request Nov 22, 2024
fixes #2768

Generate an LLVM memcpy for OpCopyLogical, rather than a call to an OpCopyLogical function.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@1a1bf17d9e8684c
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.

4 participants