Skip to content

Commit bae4464

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents 278a983 + 9d908d8 commit bae4464

File tree

5 files changed

+11
-16
lines changed

5 files changed

+11
-16
lines changed

devops/actions/clang-format/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ runs:
66
- name: Run clang-format for the patch
77
shell: bash {0}
88
run: |
9+
git config --global --add safe.directory /__w/llvm/llvm
910
git clang-format ${GITHUB_SHA}^1
1011
git diff > ./clang-format.patch
1112
# Add patch with formatting fixes to CI job artifacts

devops/actions/llvm_test_suite/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ post-if: false
3333
runs:
3434
using: "composite"
3535
steps:
36-
- run: cp -r /actions .
36+
- run: |
37+
cp -r /actions .
38+
git config --global --add safe.directory /__w/repo_cache/intel/llvm-test-suite
3739
shell: bash
3840
- name: Checkout LLVM Test Suite
3941
uses: ./actions/cached_checkout

sycl/include/CL/sycl/detail/stl_type_traits.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@ struct is_output_iterator<T, output_iterator_requirements<T>> {
7878
static constexpr bool value = true;
7979
};
8080

81-
template <typename T, typename U>
82-
inline constexpr bool is_same_v = std::is_same<T, U>::value;
83-
84-
template <typename T, typename U>
85-
inline constexpr bool is_convertible_v = std::is_convertible<T, U>::value;
86-
8781
} // namespace detail
8882
} // namespace sycl
8983
} // __SYCL_INLINE_NAMESPACE(cl)

sycl/include/CL/sycl/handler.hpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -927,14 +927,11 @@ class __SYCL_EXPORT handler {
927927
}
928928

929929
template <int Dims, typename LambdaArgType> struct TransformUserItemType {
930-
using type = typename std::conditional_t<
931-
detail::is_same_v<id<Dims>, LambdaArgType>, LambdaArgType,
932-
typename std::conditional_t<
933-
detail::is_convertible_v<nd_item<Dims>, LambdaArgType>,
934-
nd_item<Dims>,
935-
typename std::conditional_t<
936-
detail::is_convertible_v<item<Dims>, LambdaArgType>, item<Dims>,
937-
LambdaArgType>>>;
930+
using type = typename std::conditional<
931+
std::is_convertible<nd_item<Dims>, LambdaArgType>::value, nd_item<Dims>,
932+
typename std::conditional<
933+
std::is_convertible<item<Dims>, LambdaArgType>::value, item<Dims>,
934+
LambdaArgType>::type>::type;
938935
};
939936

940937
/// Defines and invokes a SYCL kernel function for the specified range.

sycl/test/basic_tests/parallel_for_type_check.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %clangxx -fsycl -fsycl-device-only -D__SYCL_INTERNAL_API -O0 -c -emit-llvm -S -o - %s | FileCheck %s
22

33
// This test performs basic type check for sycl::id that is used in result type.
4+
// Check that sycl::id is converted from sycl::item.
45

56
#include <CL/sycl.hpp>
67
#include <iostream>
@@ -21,7 +22,7 @@ int main() {
2122
auto buf_acc = data_buf.get_access<sycl::access::mode::read_write>(h);
2223
h.parallel_for(
2324
sycl::range<1>{sz},
24-
// CHECK: cl{{.*}}sycl{{.*}}detail{{.*}}RoundedRangeKernel{{.*}}id{{.*}}main{{.*}}handler
25+
// CHECK: cl{{.*}}sycl{{.*}}detail{{.*}}RoundedRangeKernel{{.*}}item{{.*}}main{{.*}}handler
2526
[=](sycl::id<1> item) { buf_acc[item] += 1; });
2627
});
2728
q.wait();

0 commit comments

Comments
 (0)