Skip to content

Commit 2d5968c

Browse files
committed
Remove wait_and_throw()s
1 parent 0e2064e commit 2d5968c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

external/Stats.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ void updateStats(sycl::queue myQueue, sycl::buffer<Actor> actorBuf,
2828
sum += actorAcc[index].getPrevForce();
2929
}
3030
});
31-
})
32-
.wait_and_throw();
31+
});
32+
myQueue.throw_asynchronous();
3333

3434
myQueue
3535
.submit([&](sycl::handler &cgh) {
@@ -46,8 +46,8 @@ void updateStats(sycl::queue myQueue, sycl::buffer<Actor> actorBuf,
4646
sum += 1.0f;
4747
}
4848
});
49-
})
50-
.wait_and_throw();
49+
});
50+
myQueue.throw_asynchronous();
5151

5252
sycl::host_accessor<float, 1, sycl::access::mode::read> forceSumHostAcc(
5353
forceSumBuf);
@@ -81,8 +81,8 @@ void updateStats(sycl::queue myQueue, sycl::buffer<Actor> actorBuf,
8181
destinationTimesAcc[index] = duration;
8282
}
8383
});
84-
})
85-
.wait_and_throw();
84+
});
85+
myQueue.throw_asynchronous();
8686

8787
sycl::host_accessor<int, 1, sycl::access::mode::read>
8888
destinationTimesHostAcc(destinationTimesBuf);
@@ -120,8 +120,8 @@ void finalizeStats(sycl::queue myQueue, std::vector<float> averageForces,
120120
[=](sycl::id<1> index, auto &sum) {
121121
sum += durationAcc[index];
122122
});
123-
})
124-
.wait_and_throw();
123+
});
124+
myQueue.throw_asynchronous();
125125

126126
sycl::host_accessor<int, 1, sycl::access::mode::read>
127127
durationSumHostAcc(durationSumBuf);

0 commit comments

Comments
 (0)