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
>
14
#include <
sycl/detail/info_desc_helpers.hpp
>
15
#include <
sycl/info/info_desc.hpp
>
16
17
namespace
sycl
{
18
__SYCL_INLINE_VER_NAMESPACE
(_V1) {
19
namespace
detail {
20
21
template
<
typename
Param>
22
typename
Param::return_type
get_event_profiling_info
(
RT::PiEvent
Event,
23
const
PluginPtr
&Plugin) {
24
static_assert(
is_event_profiling_info_desc<Param>::value
,
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
28
Plugin->call<
PiApiKind::piEventGetProfilingInfo
>(
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
PluginPtr
&Plugin) {
36
static_assert(
is_event_info_desc<Param>::value
,
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
40
Plugin->call<
PiApiKind::piEventGetInfo
>(Event,
PiInfoCode<Param>::value
,
41
sizeof
(Result), &Result,
nullptr
);
42
return
Result;
43
}
44
45
}
// namespace detail
46
}
// __SYCL_INLINE_VER_NAMESPACE(_V1)
47
}
// namespace sycl
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:1478
event_impl.hpp
sycl::_V1::detail::get_event_info
Param::return_type get_event_info(RT::PiEvent Event, const PluginPtr &Plugin)
Definition:
event_info.hpp:34
__SYCL_INLINE_VER_NAMESPACE
#define __SYCL_INLINE_VER_NAMESPACE(X)
Definition:
defines_elementary.hpp:11
sycl
---— Error handling, matching OpenCL plugin semantics.
Definition:
access.hpp:14
sycl::_V1::detail::PiInfoCode
Definition:
info_desc_helpers.hpp:18
plugin.hpp
sycl::_V1::detail::get_event_profiling_info
Param::return_type get_event_profiling_info(RT::PiEvent Event, const PluginPtr &Plugin)
Definition:
event_info.hpp:22
common.hpp
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:1442
info_desc_helpers.hpp
info_desc.hpp
sycl::_V1::detail::is_event_info_desc
Definition:
info_desc_helpers.hpp:26
sycl::_V1::detail::is_event_profiling_info_desc
Definition:
info_desc_helpers.hpp:27
sycl::_V1::detail::pi::PiEvent
::pi_event PiEvent
Definition:
pi.hpp:138
sycl::_V1::detail::PluginPtr
std::shared_ptr< plugin > PluginPtr
Definition:
pi.hpp:47
source
detail
event_info.hpp
Generated by
1.8.17