DPC++ Runtime
Runtime libraries for oneAPI DPC++
assert_happened.hpp
Go to the documentation of this file.
1
//==------- assert_happened.hpp - Assert signalling structure --------------==//
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 <
sycl/detail/defines_elementary.hpp
>
12
13
#include <cstdint>
14
15
#ifdef __SYCL_DEVICE_ONLY__
16
// Reads Flag of AssertHappened on device
17
__DPCPP_SYCL_EXTERNAL
__attribute__
((weak))
extern
"C"
void
18
__devicelib_assert_read(
void
*);
19
#endif
20
21
namespace
sycl
{
22
__SYCL_INLINE_VER_NAMESPACE
(_V1) {
23
namespace
detail {
24
// NOTE Layout of this structure should be aligned with the one in
25
// libdevice/include/assert-happened.hpp
26
struct
AssertHappened
{
27
int
Flag = 0;
// set to non-zero upon assert failure
28
char
Expr[256 + 1] =
""
;
29
char
File[256 + 1] =
""
;
30
char
Func[128 + 1] =
""
;
31
32
int32_t Line = 0;
33
34
uint64_t GID0 = 0;
35
uint64_t GID1 = 0;
36
uint64_t GID2 = 0;
37
38
uint64_t LID0 = 0;
39
uint64_t LID1 = 0;
40
uint64_t LID2 = 0;
41
};
42
}
// namespace detail
43
}
// __SYCL_INLINE_VER_NAMESPACE(_V1)
44
}
// namespace sycl
sycl::_V1::detail::AssertHappened
Definition:
assert_happened.hpp:26
__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
defines_elementary.hpp
sycl::_V1::ext::oneapi::experimental::__attribute__
__attribute__((always_inline)) auto invoke_simd(sycl
The invoke_simd free function invokes a SIMD function using all work-items in a sub_group.
Definition:
invoke_simd.hpp:462
__DPCPP_SYCL_EXTERNAL
#define __DPCPP_SYCL_EXTERNAL
Definition:
defines_elementary.hpp:35
include
sycl
detail
assert_happened.hpp
Generated by
1.8.17