memory-task-sot.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOT_MEMORY_TASK_HH
11 #define __SOT_MEMORY_TASK_HH
12 
13 #include <sot/core/matrix-svd.hh>
15 
16 #include "sot/core/api.hh"
17 
18 /* --------------------------------------------------------------------- */
19 /* --- CLASS ----------------------------------------------------------- */
20 /* --------------------------------------------------------------------- */
21 
22 namespace dynamicgraph {
23 namespace sot {
24 
26  public: // protected:
27  typedef Eigen::Map<Matrix, Eigen::internal::traits<Matrix>::Alignment>
29  typedef Eigen::Map<const Matrix, Eigen::internal::traits<Matrix>::Alignment>
31 
32  /* Internal memory to reduce the dynamic allocation at task resolution. */
33  dynamicgraph::Vector err, tmpTask, tmpVar, tmpControl;
34  dynamicgraph::Matrix Jt; //( nJ,mJ );
35 
37 
40 
42  if (kernel.rows() != r || kernel.cols() != c) {
43  if (kernelMem.size() < r * c) kernelMem.resize(r, c);
44  new (&kernel) Kernel_t(kernelMem.data(), r, c);
45  }
46  }
47 
49  resizeKernel(r, c);
50  return kernel;
51  }
52 
53  public:
58  MemoryTaskSOT(const Matrix::Index nJ = 0, const Matrix::Index mJ = 0);
59 
60  void display(std::ostream &os) const;
61 
62  private:
63  void initMemory(const Matrix::Index nJ, const Matrix::Index mJ);
64 
66 };
67 
68 } /* namespace sot */
69 } /* namespace dynamicgraph */
70 
71 #endif // __SOT_MEMORY_TASK_HH
Eigen::VectorXd Vector
Eigen::Map< const Matrix, Eigen::internal::traits< Matrix >::Alignment > KernelConst_t
FCL_REAL r
Vec3f c
#define SOT_CORE_EXPORT
Definition: api.hh:20
Eigen::Map< Matrix, Eigen::internal::traits< Matrix >::Alignment > Kernel_t
MemoryTaskSOT::Kernel_t Kernel_t
Definition: sot.cpp:351
Eigen::JacobiSVD< Matrix > SVD_t
Definition: matrix-svd.hh:23
Eigen::MatrixXd Matrix
Kernel_t & getKernel(const Matrix::Index r, const Matrix::Index c)
std::size_t Index
err
void resizeKernel(const Matrix::Index r, const Matrix::Index c)


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26