From 0ab8018028eff272591861921bef455d28435db7 Mon Sep 17 00:00:00 2001 From: akira_you Date: Sun, 26 Mar 2017 06:29:29 +0900 Subject: [PATCH] No need to align on VecX --- src/FullSystem/CoarseInitializer.h | 2 +- src/FullSystem/FullSystem.cpp | 2 +- src/FullSystem/FullSystem.h | 10 +++++----- src/FullSystem/FullSystemOptimize.cpp | 12 ++++++------ src/FullSystem/Residuals.h | 2 +- src/OptimizationBackend/EnergyFunctional.h | 10 +++++----- src/util/NumType.h | 4 +--- 7 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/FullSystem/CoarseInitializer.h b/src/FullSystem/CoarseInitializer.h index 2ab4c7409..54c48c669 100644 --- a/src/FullSystem/CoarseInitializer.h +++ b/src/FullSystem/CoarseInitializer.h @@ -78,7 +78,7 @@ struct Pnt class CoarseInitializer { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; CoarseInitializer(int w, int h); ~CoarseInitializer(); diff --git a/src/FullSystem/FullSystem.cpp b/src/FullSystem/FullSystem.cpp index d6b4ecc02..516f6ccec 100644 --- a/src/FullSystem/FullSystem.cpp +++ b/src/FullSystem/FullSystem.cpp @@ -1446,7 +1446,7 @@ void FullSystem::printEigenValLine() variancesLog->flush(); } - vectorA &nsp = ef->lastNullspaces_forLogging; + std::vector &nsp = ef->lastNullspaces_forLogging; (*nullspacesLog) << allKeyFramesHistory.back()->id << " "; for(unsigned int i=0;ilastHS * nsp[i]) << " " << nsp[i].dot(ef->lastbS) << " " ; diff --git a/src/FullSystem/FullSystem.h b/src/FullSystem/FullSystem.h index 0674adee0..2825723df 100644 --- a/src/FullSystem/FullSystem.h +++ b/src/FullSystem/FullSystem.h @@ -210,11 +210,11 @@ class FullSystem { void debugPlotTracking(); - vectorA getNullspaces( - vectorA &nullspaces_pose, - vectorA &nullspaces_scale, - vectorA &nullspaces_affA, - vectorA &nullspaces_affB); + std::vector getNullspaces( + std::vector &nullspaces_pose, + std::vector &nullspaces_scale, + std::vector &nullspaces_affA, + std::vector &nullspaces_affB); void setNewFrameEnergyTH(); diff --git a/src/FullSystem/FullSystemOptimize.cpp b/src/FullSystem/FullSystemOptimize.cpp index 30a4017a0..74af9c17d 100644 --- a/src/FullSystem/FullSystemOptimize.cpp +++ b/src/FullSystem/FullSystemOptimize.cpp @@ -655,11 +655,11 @@ void FullSystem::removeOutliers() -vectorA FullSystem::getNullspaces( - vectorA &nullspaces_pose, - vectorA &nullspaces_scale, - vectorA &nullspaces_affA, - vectorA &nullspaces_affB) +std::vector FullSystem::getNullspaces( + std::vector &nullspaces_pose, + std::vector &nullspaces_scale, + std::vector &nullspaces_affA, + std::vector &nullspaces_affB) { nullspaces_pose.clear(); nullspaces_scale.clear(); @@ -668,7 +668,7 @@ vectorA FullSystem::getNullspaces( int n=CPARS+frameHessians.size()*8; - vectorA nullspaces_x0_pre; + std::vector nullspaces_x0_pre; for(int i=0;i<6;i++) { VecX nullspace_x0(n); diff --git a/src/FullSystem/Residuals.h b/src/FullSystem/Residuals.h index 9663a3000..17745fe81 100644 --- a/src/FullSystem/Residuals.h +++ b/src/FullSystem/Residuals.h @@ -100,7 +100,7 @@ class PointFrameResidual void debugPlot(); - void printRows(vectorA &v, VecX &r, int nFrames, int nPoints, int M, int res); + void printRows(std::vector &v, VecX &r, int nFrames, int nPoints, int M, int res); }; } diff --git a/src/OptimizationBackend/EnergyFunctional.h b/src/OptimizationBackend/EnergyFunctional.h index deba36100..16d8bb920 100644 --- a/src/OptimizationBackend/EnergyFunctional.h +++ b/src/OptimizationBackend/EnergyFunctional.h @@ -105,11 +105,11 @@ class EnergyFunctional { MatXX lastHS; VecX lastbS; VecX lastX; - vectorA lastNullspaces_forLogging; - vectorA lastNullspaces_pose; - vectorA lastNullspaces_scale; - vectorA lastNullspaces_affA; - vectorA lastNullspaces_affB; + std::vector lastNullspaces_forLogging; + std::vector lastNullspaces_pose; + std::vector lastNullspaces_scale; + std::vector lastNullspaces_affA; + std::vector lastNullspaces_affB; IndexThreadReduce* red; diff --git a/src/util/NumType.h b/src/util/NumType.h index 5872e1555..a12d42073 100644 --- a/src/util/NumType.h +++ b/src/util/NumType.h @@ -27,12 +27,10 @@ #include "Eigen/Core" #include "sophus/sim3.hpp" #include "sophus/se3.hpp" -#include + namespace dso { -template > > -using vectorA = std::vector< T, Allocator > ; // CAMERA MODEL TO USE