We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4202d86 + 2c88555 commit 9f96d2dCopy full SHA for 9f96d2d
1 file changed
DirectProgramming/C++SYCL/DenseLinearAlgebra/address_sanitizer/src/bad_free.cpp
@@ -1,13 +1,22 @@
1
-// REQUIRES: linux
2
-// RUN: %{build} %device_sanitizer_flags -O0 -g -o %t
3
-// RUN: env SYCL_PREFER_UR=1 UR_ENABLE_LAYERS=UR_LAYER_ASAN %{run} not %t 2>&1 | FileCheck --check-prefixes CHECK %s
+// Copyright (C) 2024 Intel Corporation
+// SPDX-License-Identifier: MIT
+
4
#include <sycl/sycl.hpp>
5
6
constexpr size_t N = 64;
7
8
int main() {
9
sycl::queue Q;
10
auto *data = new int[N];
11
+ auto *array = sycl::malloc_device<long long>(N, Q);
12
13
+ Q.submit([&](sycl::handler &h) {
14
+ h.parallel_for<class MyKernel>(
15
+ sycl::nd_range<1>(N, 1),
16
+ [=](sycl::nd_item<1> item) { ++array[item.get_global_id(0)]; });
17
+ });
18
+ Q.wait();
19
20
sycl::free(data, Q);
21
return 0;
22
}
0 commit comments