DPC++ Runtime
Runtime libraries for oneAPI DPC++
auto_local_range.hpp
Go to the documentation of this file.
1
//==--- auto_local_range.hpp --- SYCL extension for auto range -------------==//
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
11
#include <
sycl/range.hpp
>
12
13
namespace
sycl
{
14
inline
namespace
_V1 {
15
namespace
ext::oneapi::experimental {
16
17
template
<
int
Dimensions>
static
inline
range<Dimensions>
auto_range
() {
18
static_assert(1 <=
Dimensions
&&
Dimensions
<= 3);
19
if
constexpr (
Dimensions
== 3) {
20
return
range<Dimensions>
(0, 0, 0);
21
}
else
if
constexpr (
Dimensions
== 2) {
22
return
range<Dimensions>
(0, 0);
23
}
else
{
24
return
range<Dimensions>
(0);
25
}
26
}
27
28
}
// namespace ext::oneapi::experimental
29
}
// namespace _V1
30
}
// namespace sycl
sycl::_V1::range< Dimensions >
sycl::_V1::ext::oneapi::experimental::auto_range
static range< Dimensions > auto_range()
Definition:
auto_local_range.hpp:17
sycl::_V1::Dimensions
class __SYCL_EBO __SYCL_SPECIAL_CLASS Dimensions
Definition:
accessor_image.hpp:578
sycl
Definition:
access.hpp:18
range.hpp
include
sycl
ext
oneapi
experimental
auto_local_range.hpp
Generated by
1.9.1