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 <cstdint>
// for uint64_t, int32_t
12
13
#if defined(__SYCL_DEVICE_ONLY__) && __SYCL_USE_FALLBACK_ASSERT
14
// Reads Flag of AssertHappened on device
15
__DPCPP_SYCL_EXTERNAL
__attribute__
((weak))
extern
"C"
void
16
__devicelib_assert_read(
void
*);
17
#endif
18
19
namespace
sycl
{
20
inline
namespace
_V1 {
21
namespace
detail {
22
// NOTE Layout of this structure should be aligned with the one in
23
// libdevice/include/assert-happened.hpp
24
struct
AssertHappened
{
25
int
Flag
= 0;
// set to non-zero upon assert failure
26
char
Expr
[256 + 1] =
""
;
27
char
File
[256 + 1] =
""
;
28
char
Func
[128 + 1] =
""
;
29
30
int32_t
Line
= 0;
31
32
uint64_t
GID0
= 0;
33
uint64_t
GID1
= 0;
34
uint64_t
GID2
= 0;
35
36
uint64_t
LID0
= 0;
37
uint64_t
LID1
= 0;
38
uint64_t
LID2
= 0;
39
};
40
}
// namespace detail
41
}
// namespace _V1
42
}
// namespace sycl
__DPCPP_SYCL_EXTERNAL
#define __DPCPP_SYCL_EXTERNAL
Definition:
defines_elementary.hpp:33
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:464
sycl
Definition:
access.hpp:18
sycl::_V1::detail::AssertHappened
Definition:
assert_happened.hpp:24
sycl::_V1::detail::AssertHappened::GID2
uint64_t GID2
Definition:
assert_happened.hpp:34
sycl::_V1::detail::AssertHappened::File
char File[256+1]
Definition:
assert_happened.hpp:27
sycl::_V1::detail::AssertHappened::Line
int32_t Line
Definition:
assert_happened.hpp:30
sycl::_V1::detail::AssertHappened::Expr
char Expr[256+1]
Definition:
assert_happened.hpp:26
sycl::_V1::detail::AssertHappened::LID1
uint64_t LID1
Definition:
assert_happened.hpp:37
sycl::_V1::detail::AssertHappened::Func
char Func[128+1]
Definition:
assert_happened.hpp:28
sycl::_V1::detail::AssertHappened::Flag
int Flag
Definition:
assert_happened.hpp:25
sycl::_V1::detail::AssertHappened::GID1
uint64_t GID1
Definition:
assert_happened.hpp:33
sycl::_V1::detail::AssertHappened::LID2
uint64_t LID2
Definition:
assert_happened.hpp:38
sycl::_V1::detail::AssertHappened::LID0
uint64_t LID0
Definition:
assert_happened.hpp:36
sycl::_V1::detail::AssertHappened::GID0
uint64_t GID0
Definition:
assert_happened.hpp:32
include
sycl
detail
assert_happened.hpp
Generated by
1.9.1