DPC++ Runtime
Runtime libraries for oneAPI DPC++
backend_impl.hpp
Go to the documentation of this file.
1
//==------------------ backend_impl.hpp - get impls backend ----------------==//
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 <cassert>
11
#include <
sycl/backend_types.hpp
>
12
13
namespace
sycl
{
14
__SYCL_INLINE_VER_NAMESPACE
(_V1) {
15
namespace
detail {
16
17
template
<
class
T>
backend
getImplBackend
(
const
T &Impl) {
18
assert(!Impl->is_host() &&
"Cannot get the backend for host."
);
19
return
Impl->getPlugin().getBackend();
20
}
21
22
}
// namespace detail
23
}
// __SYCL_INLINE_VER_NAMESPACE(_V1)
24
}
// namespace sycl
sycl::_V1::backend
backend
Definition:
backend_types.hpp:21
__SYCL_INLINE_VER_NAMESPACE
#define __SYCL_INLINE_VER_NAMESPACE(X)
Definition:
defines_elementary.hpp:11
sycl
---— Error handling, matching OpenCL plugin semantics.
Definition:
access.hpp:14
sycl::_V1::detail::getImplBackend
backend getImplBackend(const T &Impl)
Definition:
backend_impl.hpp:17
backend_types.hpp
source
detail
backend_impl.hpp
Generated by
1.8.17