Go to the source code of this file.
|
void | WakekNN (const std::vector< Vortex2D > &vtx, const size_t k, std::vector< std::vector< std::pair< double, size_t >>> &initdist) |
|
void WakekNN |
( |
const std::vector< Vortex2D > & |
vtx, |
|
|
const size_t |
k, |
|
|
std::vector< std::vector< std::pair< double, size_t >>> & |
initdist |
|
) |
| |
Definition at line 447 of file knnCPU.cpp.
448 const size_t n = vtx.size();
451 double scale = std::max(gab.second[0] - gab.first[0], gab.second[1] - gab.first[1]);
454 std::vector<TParticleCode> mortonCodeBoth(2 * vtx.size());
457 std::vector<unsigned int> s(256 * omp_get_max_threads());
458 std::vector<TParticleCode> mortonCodeBoth_temp(2 * vtx.size());
462 std::vector<TParticleCode> mcdata, mcquery;
464 std::vector<unsigned int> iq;
469 std::vector<size_t> initneig(vtx.size(), -1);
479 double t1 = omp_get_wtime();
480 double tStart[5], tFinish[5];
482 for (
size_t sdvig = 0; sdvig <= 4; ++sdvig)
485 tStart[sdvig] = omp_get_wtime();
486 mainCycle((
int)k, vtx, gab, scale, (
int)sdvig,
488 s, mortonCodeBoth_temp, mcdata, mcquery,
489 iq, initneig, initdist, time[sdvig]);
490 tFinish[sdvig] = omp_get_wtime();
501 }
void mainCycle(const int k, const std::vector< Vortex2D > &vtx, const std::pair< Point2D, Point2D > &gab, const double scale, const int sdvig, std::vector< TParticleCode > &mortonCodeBoth, std::vector< unsigned int > &s, std::vector< TParticleCode > &mortonCodeBoth_temp, std::vector< TParticleCode > &mcdata, std::vector< TParticleCode > &mcquery, std::vector< unsigned int > &iq, std::vector< size_t > &initneig, std::vector< std::vector< std::pair< double, size_t >>> &initdist, double *time)
std::pair< Point2D, Point2D > GetGabarit(const std::vector< Vortex2D > &vtx)
( )