Skip to content

Commit 676f3f1

Browse files
committed
[SYCL] Provided some aliases to sycl
Signed-off-by: mdimakov <[email protected]>
1 parent 38fec7c commit 676f3f1

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

sycl/include/CL/sycl.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <CL/sycl/exception.hpp>
3030
#include <CL/sycl/feature_test.hpp>
3131
#include <CL/sycl/group.hpp>
32+
#include <CL/sycl/group_algorithm.hpp>
3233
#include <CL/sycl/group_local_memory.hpp>
3334
#include <CL/sycl/handler.hpp>
3435
#include <CL/sycl/id.hpp>

sycl/include/CL/sycl/ONEAPI/functional.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
__SYCL_INLINE_NAMESPACE(cl) {
1313
namespace sycl {
14+
15+
template <typename T = void> using plus = std::plus<T>;
16+
1417
namespace ONEAPI {
1518

1619
template <typename T = void> struct minimum {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//==----------- group_algorithm.hpp ------------------------------------==//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#pragma once
10+
#include <CL/sycl/ONEAPI/group_algorithm.hpp>
11+
12+
__SYCL_INLINE_NAMESPACE(cl) {
13+
namespace sycl {
14+
template <typename... Args>
15+
auto reduce_over_group(Args&&... args)
16+
-> decltype(ONEAPI::reduce(std::forward<Args>(args)...)) {
17+
return ONEAPI::reduce(std::forward<Args>(args)...);
18+
}
19+
} // namespace sycl
20+
} // __SYCL_INLINE_NAMESPACE(cl)

0 commit comments

Comments
 (0)