DPC++ Runtime
Runtime libraries for oneAPI DPC++
event_info.hpp
Go to the documentation of this file.
1 //==---------------- event_info.hpp - SYCL event ---------------------------==//
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/event_impl.hpp>
12 #include <detail/plugin.hpp>
13 #include <sycl/detail/common.hpp>
15 #include <sycl/info/info_desc.hpp>
16 
17 namespace sycl {
19 namespace detail {
20 
21 template <typename Param>
22 typename Param::return_type get_event_profiling_info(RT::PiEvent Event,
23  const plugin &Plugin) {
25  "Unexpected event profiling info descriptor");
26  typename Param::return_type Result{0};
27  // TODO catch an exception and put it to list of asynchronous exceptions
29  Event, PiInfoCode<Param>::value, sizeof(Result), &Result, nullptr);
30  return Result;
31 }
32 
33 template <typename Param>
34 typename Param::return_type get_event_info(RT::PiEvent Event,
35  const plugin &Plugin) {
37  "Unexpected event info descriptor");
38  typename Param::return_type Result{0};
39  // TODO catch an exception and put it to list of asynchronous exceptions
41  sizeof(Result), &Result, nullptr);
42  return Result;
43 }
44 
45 } // namespace detail
46 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
47 } // namespace sycl
The plugin class provides a unified interface to the underlying low-level runtimes for the device-agn...
Definition: plugin.hpp:90
void call(ArgsT... Args) const
Calls the API, traces the call, checks the result.
Definition: plugin.hpp:217
#define __SYCL_INLINE_VER_NAMESPACE(X)
::pi_event PiEvent
Definition: pi.hpp:121
Param::return_type get_event_profiling_info(RT::PiEvent Event, const plugin &Plugin)
Definition: event_info.hpp:22
Param::return_type get_event_info(RT::PiEvent Event, const plugin &Plugin)
Definition: event_info.hpp:34
---— Error handling, matching OpenCL plugin semantics.
Definition: access.hpp:14
pi_result piEventGetInfo(pi_event event, pi_event_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piEventGetProfilingInfo(pi_event event, pi_profiling_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)