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
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
#define __DPCPP_SYCL_EXTERNAL
__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: access.hpp:18