DPC++ Runtime
Runtime libraries for oneAPI DPC++
context_info.hpp
Go to the documentation of this file.
1 //==---------------- context_info.hpp - SYCL context -----------*- C++ -*---==//
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 <detail/context_impl.hpp>
12 #include <sycl/detail/common.hpp>
14 #include <sycl/info/info_desc.hpp>
15 
16 namespace sycl {
17 inline namespace _V1 {
18 namespace detail {
19 
20 template <typename Param>
21 typename Param::return_type get_context_info(sycl::detail::pi::PiContext Ctx,
22  const PluginPtr &Plugin) {
24  "Invalid context information descriptor");
25  typename Param::return_type Result = 0;
26  // TODO catch an exception and put it to list of asynchronous exceptions
28  sizeof(Result), &Result, nullptr);
29  return Result;
30 }
31 
32 } // namespace detail
33 } // namespace _V1
34 } // namespace sycl
Param::return_type get_context_info(sycl::detail::pi::PiContext Ctx, const PluginPtr &Plugin)
std::shared_ptr< plugin > PluginPtr
Definition: pi.hpp:48
Definition: access.hpp:18
pi_result piContextGetInfo(pi_context context, pi_context_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
Definition: pi_cuda.cpp:124