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 {
18 inline namespace _V1 {
19 namespace detail {
20 
21 template <typename Param>
22 typename Param::return_type
24  const PluginPtr &Plugin) {
26  "Unexpected event profiling info descriptor");
27  typename Param::return_type Result{0};
28  // TODO catch an exception and put it to list of asynchronous exceptions
30  Event, PiInfoCode<Param>::value, sizeof(Result), &Result, nullptr);
31  return Result;
32 }
33 
34 template <typename Param>
35 typename Param::return_type get_event_info(sycl::detail::pi::PiEvent Event,
36  const PluginPtr &Plugin) {
38  "Unexpected event info descriptor");
39  typename Param::return_type Result{0};
40  // TODO catch an exception and put it to list of asynchronous exceptions
42  sizeof(Result), &Result, nullptr);
43  return Result;
44 }
45 
46 } // namespace detail
47 } // namespace _V1
48 } // namespace sycl
Param::return_type get_event_info(sycl::detail::pi::PiEvent Event, const PluginPtr &Plugin)
Definition: event_info.hpp:35
std::shared_ptr< plugin > PluginPtr
Definition: pi.hpp:48
Param::return_type get_event_profiling_info(sycl::detail::pi::PiEvent Event, const PluginPtr &Plugin)
Definition: event_info.hpp:23
Definition: access.hpp:18
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)
Definition: pi_cuda.cpp:566
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)
Definition: pi_cuda.cpp:573