Skip to content

Commit

Permalink
testing knn
Browse files Browse the repository at this point in the history
  • Loading branch information
adarshyoga committed Apr 20, 2024
1 parent d16994c commit 6eaba8b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ sycl::event knn_impl(sycl::queue q,
size_t data_dim)
{
sycl::event partial_hists_ev = q.submit([&](sycl::handler &h) {
sycl::stream out(8192, 256, h);
h.parallel_for<theKernel<FpTy, IntTy>>(
sycl::range<1>{test_size}, [=](sycl::id<1> myID) {
size_t i = myID[0];
Expand Down Expand Up @@ -101,8 +102,10 @@ sycl::event knn_impl(sycl::queue q,
// simple vote
size_t val = 0;
for (size_t j = 0; j < k; ++j) {

size_t ith_idx = i * classes_num;
size_t jth = queue_neighbors[j].label;
out << ith_idx << " " << jth << sycl::endl;
d_votes_to_classes[ith_idx + jth] = jth;
//d_votes_to_classes[(i*classes_num) + (queue_neighbors[j].label)] += 1;
}
Expand Down

0 comments on commit 6eaba8b

Please sign in to comment.