Skip to content

Commit

Permalink
No need to align on VecX
Browse files Browse the repository at this point in the history
  • Loading branch information
akirayou authored and JakobEngel committed Apr 3, 2017
1 parent a9473ea commit 0ab8018
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/FullSystem/CoarseInitializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/FullSystem/FullSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ void FullSystem::printEigenValLine()
variancesLog->flush();
}

vectorA<VecX> &nsp = ef->lastNullspaces_forLogging;
std::vector<VecX> &nsp = ef->lastNullspaces_forLogging;
(*nullspacesLog) << allKeyFramesHistory.back()->id << " ";
for(unsigned int i=0;i<nsp.size();i++)
(*nullspacesLog) << nsp[i].dot(ef->lastHS * nsp[i]) << " " << nsp[i].dot(ef->lastbS) << " " ;
Expand Down
10 changes: 5 additions & 5 deletions src/FullSystem/FullSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ class FullSystem {

void debugPlotTracking();

vectorA<VecX> getNullspaces(
vectorA<VecX> &nullspaces_pose,
vectorA<VecX> &nullspaces_scale,
vectorA<VecX> &nullspaces_affA,
vectorA<VecX> &nullspaces_affB);
std::vector<VecX> getNullspaces(
std::vector<VecX> &nullspaces_pose,
std::vector<VecX> &nullspaces_scale,
std::vector<VecX> &nullspaces_affA,
std::vector<VecX> &nullspaces_affB);

void setNewFrameEnergyTH();

Expand Down
12 changes: 6 additions & 6 deletions src/FullSystem/FullSystemOptimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,11 @@ void FullSystem::removeOutliers()



vectorA<VecX> FullSystem::getNullspaces(
vectorA<VecX> &nullspaces_pose,
vectorA<VecX> &nullspaces_scale,
vectorA<VecX> &nullspaces_affA,
vectorA<VecX> &nullspaces_affB)
std::vector<VecX> FullSystem::getNullspaces(
std::vector<VecX> &nullspaces_pose,
std::vector<VecX> &nullspaces_scale,
std::vector<VecX> &nullspaces_affA,
std::vector<VecX> &nullspaces_affB)
{
nullspaces_pose.clear();
nullspaces_scale.clear();
Expand All @@ -668,7 +668,7 @@ vectorA<VecX> FullSystem::getNullspaces(


int n=CPARS+frameHessians.size()*8;
vectorA<VecX> nullspaces_x0_pre;
std::vector<VecX> nullspaces_x0_pre;
for(int i=0;i<6;i++)
{
VecX nullspace_x0(n);
Expand Down
2 changes: 1 addition & 1 deletion src/FullSystem/Residuals.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class PointFrameResidual

void debugPlot();

void printRows(vectorA<VecX> &v, VecX &r, int nFrames, int nPoints, int M, int res);
void printRows(std::vector<VecX> &v, VecX &r, int nFrames, int nPoints, int M, int res);
};
}

10 changes: 5 additions & 5 deletions src/OptimizationBackend/EnergyFunctional.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ class EnergyFunctional {
MatXX lastHS;
VecX lastbS;
VecX lastX;
vectorA<VecX> lastNullspaces_forLogging;
vectorA<VecX> lastNullspaces_pose;
vectorA<VecX> lastNullspaces_scale;
vectorA<VecX> lastNullspaces_affA;
vectorA<VecX> lastNullspaces_affB;
std::vector<VecX> lastNullspaces_forLogging;
std::vector<VecX> lastNullspaces_pose;
std::vector<VecX> lastNullspaces_scale;
std::vector<VecX> lastNullspaces_affA;
std::vector<VecX> lastNullspaces_affB;

IndexThreadReduce<Vec10>* red;

Expand Down
4 changes: 1 addition & 3 deletions src/util/NumType.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@
#include "Eigen/Core"
#include "sophus/sim3.hpp"
#include "sophus/se3.hpp"
#include <vector>


namespace dso
{
template <class T, class Allocator = Eigen::aligned_allocator<std::pair<const int,T>> >
using vectorA = std::vector< T, Allocator > ;

// CAMERA MODEL TO USE

Expand Down

0 comments on commit 0ab8018

Please sign in to comment.