DPC++ Runtime
Runtime libraries for oneAPI DPC++
exception_list.hpp
Go to the documentation of this file.
1
//==---------------- exception_list.hpp - SYCL exception_list --------------==//
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
// 4.9.2 Exception Class Interface
12
13
#include <
CL/sycl/detail/defines.hpp
>
14
#include <
CL/sycl/detail/export.hpp
>
15
#include <
CL/sycl/stl.hpp
>
16
17
#include <cstddef>
18
19
__SYCL_INLINE_NAMESPACE
(
cl
) {
20
namespace
sycl
{
21
22
// Forward declaration
23
namespace
detail {
24
class
queue_impl;
25
}
26
30
class
__SYCL_EXPORT
exception_list
{
31
public
:
32
using
value_type
= std::exception_ptr;
33
using
reference
=
value_type
&;
34
using
const_reference
=
const
value_type
&;
35
using
size_type
= std::size_t;
36
using
iterator
= std::vector<std::exception_ptr>::const_iterator;
37
using
const_iterator
= std::vector<std::exception_ptr>::const_iterator;
38
39
size_type
size()
const
;
40
// first asynchronous exception
41
iterator
begin()
const
;
42
// refer to past-the-end last asynchronous exception
43
iterator
end()
const
;
44
45
private
:
46
friend
class
detail::queue_impl
;
47
void
PushBack(
const_reference
Value);
48
void
PushBack(
value_type
&& Value);
49
void
Clear() noexcept;
50
std
::vector<
std
::exception_ptr> MList;
51
};
52
53
using
async_handler
=
std
::function<
void
(
cl
::
sycl
::
exception_list
)>;
54
55
}
// namespace sycl
56
}
// __SYCL_INLINE_NAMESPACE(cl)
cl::sycl::exception_list::reference
value_type & reference
Definition:
exception_list.hpp:33
cl::sycl::exception_list::const_iterator
std::vector< std::exception_ptr >::const_iterator const_iterator
Definition:
exception_list.hpp:37
stl.hpp
cl::sycl::exception_list::const_reference
const value_type & const_reference
Definition:
exception_list.hpp:34
sycl
Definition:
invoke_simd.hpp:68
export.hpp
defines.hpp
cl
We provide new interfaces for matrix muliply in this patch:
Definition:
access.hpp:13
cl::sycl::exception_list::size_type
std::size_t size_type
Definition:
exception_list.hpp:35
cl::sycl::detail::queue_impl
Definition:
queue_impl.hpp:54
cl::sycl::exception_list::iterator
std::vector< std::exception_ptr >::const_iterator iterator
Definition:
exception_list.hpp:36
std
Definition:
accessor.hpp:2617
cl::sycl::exception_list
A list of asynchronous exceptions.
Definition:
exception_list.hpp:30
cl::sycl::async_handler
std::function< void(cl::sycl::exception_list)> async_handler
Definition:
exception_list.hpp:53
cl::sycl::exception_list::value_type
std::exception_ptr value_type
Definition:
exception_list.hpp:32
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition:
defines_elementary.hpp:12
include
CL
sycl
exception_list.hpp
Generated by
1.8.17