Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 06d1b04

Browse files
[SYCL][ESIMD] Fixed stack overflow crash on Windows (#41)
1 parent add04f2 commit 06d1b04

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

SYCL/ESIMD/accessor.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ constexpr unsigned int VL = 1024 * 128;
2626
using Ty = float;
2727

2828
int main() {
29-
Ty data0[VL] = {0};
30-
Ty data1[VL] = {0};
29+
Ty *data0 = new float[VL];
30+
Ty *data1 = new float[VL];
3131
constexpr Ty VAL = 5;
3232

3333
for (int i = 0; i < VL; i++) {
@@ -88,6 +88,10 @@ int main() {
8888
<< " != " << gold1 << "(gold)\n";
8989
}
9090
}
91+
92+
delete[] data0;
93+
delete[] data1;
94+
9195
if (err_cnt == 0) {
9296
std::cout << "Passed\n";
9397
return 0;

0 commit comments

Comments
 (0)