MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / TEST_P

Function TEST_P

test/nearest_neighbour.cpp:454–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452 testNameGenerator<KNearestNeighborsTest>);
453
454TEST_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
474TEST_P(KNearestNeighborsTest, SingleQTests) {
475 UNSUPPORTED_BACKEND(AF_BACKEND_ONEAPI);

Callers

nothing calls this directly

Calls 2

nearestNeighbourFunction · 0.85
arrayClass · 0.50

Tested by

no test coverage detected