From: Jiri Vlasak Date: Mon, 24 Jun 2019 15:32:43 +0000 (+0200) Subject: Move NN-relevant macro, structure X-Git-Tag: v0.7.0~5^2~4 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hubacji1/iamcar.git/commitdiff_plain/6d0297eceeba5652354c5d3e1a639370fe2d84ef Move NN-relevant macro, structure --- diff --git a/incl/nn.h b/incl/nn.h index 4870667..c3e79a1 100644 --- a/incl/nn.h +++ b/incl/nn.h @@ -23,16 +23,6 @@ along with I am car. If not, see . #include "rrtbase.h" #include "rrtnode.h" -struct mcnn { // min-cost nearest neighbour - float mc; - RRTNode *nn; -}; -#pragma omp declare reduction \ - (minn: struct mcnn: omp_out = \ - omp_in.mc < omp_out.mc ? omp_in : omp_out) \ - initializer \ - (omp_priv(omp_orig)) - RRTNode *nn1( std::vector &nodes, RRTNode *node, diff --git a/incl/rrtbase.h b/incl/rrtbase.h index 765b495..1ffbd86 100644 --- a/incl/rrtbase.h +++ b/incl/rrtbase.h @@ -45,6 +45,17 @@ along with I am car. If not, see . #define GLVERTEX(n) ((n)->x() * glplwscale), ((n)->y() * glplhscale) +// Nearest neighbor +struct mcnn { // min-cost nearest neighbour + float mc; + RRTNode *nn; +}; +#pragma omp declare reduction \ + (minn: struct mcnn: omp_out = \ + omp_in.mc < omp_out.mc ? omp_in : omp_out) \ + initializer \ + (omp_priv(omp_orig)) + class Cell { private: std::vector nodes_;