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 
13 #include <detail/event_impl.hpp>
14 #include <detail/plugin.hpp>
15 
17 namespace sycl {
18 namespace detail {
19 
20 template <info::event_profiling Param> struct get_event_profiling_info {
21  using RetType =
23 
24  static RetType get(RT::PiEvent Event, const plugin &Plugin) {
25  RetType Result = 0;
26  // TODO catch an exception and put it to list of asynchronous exceptions
28  Event, pi_profiling_info(Param), sizeof(Result), &Result, nullptr);
29  return Result;
30  }
31 };
32 
33 template <info::event Param> struct get_event_info {
35 
36  static RetType get(RT::PiEvent Event, const plugin &Plugin) {
37  RetType Result = (RetType)0;
38  // TODO catch an exception and put it to list of asynchronous exceptions
39  Plugin.call<PiApiKind::piEventGetInfo>(Event, pi_event_info(Param),
40  sizeof(Result), &Result, nullptr);
41  return Result;
42  }
43 };
44 
45 } // namespace detail
46 } // namespace sycl
47 } // __SYCL_INLINE_NAMESPACE(cl)
piEventGetProfilingInfo
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_esimd_emulator.cpp:1391
event_impl.hpp
cl::sycl::detail::get_event_info::RetType
typename info::param_traits< info::event, Param >::return_type RetType
Definition: event_info.hpp:34
cl::sycl::detail::get_event_info::get
static RetType get(RT::PiEvent Event, const plugin &Plugin)
Definition: event_info.hpp:36
cl::sycl::info::param_traits
Definition: info_desc.hpp:310
cl::sycl::detail::get_event_info
Definition: event_info.hpp:33
cl::sycl::detail::get_event_profiling_info
Definition: event_info.hpp:20
cl::sycl::detail::get_event_profiling_info::RetType
typename info::param_traits< info::event_profiling, Param >::return_type RetType
Definition: event_info.hpp:22
sycl
Definition: invoke_simd.hpp:68
plugin.hpp
pi_profiling_info
_pi_profiling_info pi_profiling_info
Definition: pi.h:660
cl::sycl::detail::plugin::call
void call(ArgsT... Args) const
Calls the API, traces the call, checks the result.
Definition: plugin.hpp:217
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::detail::plugin
The plugin class provides a unified interface to the underlying low-level runtimes for the device-agn...
Definition: plugin.hpp:90
piEventGetInfo
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_esimd_emulator.cpp:1387
_pi_event
PI Event mapping to CUevent.
Definition: pi_cuda.hpp:458
pi_event_info
_pi_event_info pi_event_info
Definition: pi.h:646
cl::sycl::detail::get_event_profiling_info::get
static RetType get(RT::PiEvent Event, const plugin &Plugin)
Definition: event_info.hpp:24
info_desc.hpp
common.hpp
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12