We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7dbbed commit 55d058aCopy full SHA for 55d058a
Libraries/oneMKL/monte_carlo_pi/mc_pi_usm.cpp
@@ -65,9 +65,7 @@ double estimate_pi(sycl::queue& q, size_t n_points) {
65
sycl::vec<float, 2> r;
66
size_t count = 0;
67
for(int i = 0; i < count_per_thread; i++) {
68
- // r.load(i + item.get_global_linear_id() * count_per_thread, sycl::global_ptr<float>(rng_ptr));
69
- r[0] = rng_ptr[2 * (i + item.get_global_linear_id() * count_per_thread)];
70
- r[1] = rng_ptr[2 * (i + item.get_global_linear_id() * count_per_thread) + 1];
+ r.load(i + item.get_global_linear_id() * count_per_thread, sycl::global_ptr<float>(rng_ptr));
71
if(sycl::length(r) <= 1.0f) {
72
count += 1;
73
}
0 commit comments