]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Move NN-relevant macro, structure
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 24 Jun 2019 15:32:43 +0000 (17:32 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 24 Jun 2019 15:32:47 +0000 (17:32 +0200)
incl/nn.h
incl/rrtbase.h

index 4870667c884abeb7b65618ac678b74ff7d7116ce..c3e79a1b6d7f0a310f052120a58a1ffb34709266 100644 (file)
--- a/incl/nn.h
+++ b/incl/nn.h
@@ -23,16 +23,6 @@ along with I am car. If not, see <http://www.gnu.org/licenses/>.
 #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<RRTNode *> &nodes,
                 RRTNode *node,
index 765b4958fa2789f60950a42a51346d9c36106cdd..1ffbd869b82ba40f19b4e8c74a220d571cf8748b 100644 (file)
@@ -45,6 +45,17 @@ along with I am car. If not, see <http://www.gnu.org/licenses/>.
 
 #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<RRTNode *> nodes_;