| 452 | testNameGenerator<KNearestNeighborsTest>); |
| 453 | |
| 454 | TEST_P(NearestNeighborsTest, SingleQTests) { |
| 455 | UNSUPPORTED_BACKEND(AF_BACKEND_ONEAPI); |
| 456 | nearest_neighbors_params params = GetParam(); |
| 457 | array query = array(params.qdims_, params.query_.data()); |
| 458 | array train = array(params.tdims_, params.train_.data()); |
| 459 | |
| 460 | const int k = params.k_; |
| 461 | const int feat_dim = params.feat_dim_; |
| 462 | |
| 463 | array indices, distances; |
| 464 | |
| 465 | nearestNeighbour(indices, distances, query, train, feat_dim, k, AF_SSD); |
| 466 | |
| 467 | array indices_gold(params.idims_, params.indices_.data()); |
| 468 | array distances_gold(params.ddims_, params.dists_.data()); |
| 469 | |
| 470 | ASSERT_ARRAYS_EQ(indices_gold, indices); |
| 471 | ASSERT_ARRAYS_NEAR(distances_gold, distances, 1e-5); |
| 472 | } |
| 473 | |
| 474 | TEST_P(KNearestNeighborsTest, SingleQTests) { |
| 475 | UNSUPPORTED_BACKEND(AF_BACKEND_ONEAPI); |
nothing calls this directly
no test coverage detected