DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
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
11 
13 namespace sycl {
14 namespace detail {
15 
16 template <class T> backend getImplBackend(const T &Impl) {
17  backend Result;
18  if (Impl->is_host())
19  Result = backend::host;
20  else
21  Result = Impl->getPlugin().getBackend();
22 
23  return Result;
24 }
25 
26 } // namespace detail
27 } // namespace sycl
28 } // __SYCL_INLINE_NAMESPACE(cl)
cl::sycl::backend
backend
Definition: backend_types.hpp:21
T
cl::sycl::detail::getImplBackend
backend getImplBackend(const T &Impl)
Definition: backend_impl.hpp:16
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
backend_types.hpp
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12