g2o
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
g2o::csparse::CSparse::Impl Class Reference
Collaboration diagram for g2o::csparse::CSparse::Impl:
Collaboration graph
[legend]

Public Member Functions

 Impl ()=default
 
 ~Impl ()
 
void prepareWorkspace ()
 

Public Attributes

css * symbolicDecomposition = nullptr
 
int csWorkspaceSize = 0
 
double * csWorkspace = nullptr
 
int * csIntWorkspace = nullptr
 
csn * numericCholesky = nullptr
 
CSparseExt ccsA
 

Detailed Description

Pimpl-Idiom to hold the data interfacing with CSparse

Definition at line 67 of file csparse_wrapper.cpp.

Constructor & Destructor Documentation

◆ Impl()

g2o::csparse::CSparse::Impl::Impl ( )
default

◆ ~Impl()

g2o::csparse::CSparse::Impl::~Impl ( )
inline

Definition at line 70 of file csparse_wrapper.cpp.

70 {
72 cs_sfree(symbolicDecomposition);
73 symbolicDecomposition = nullptr;
74 }
75 if (numericCholesky) {
76 cs_nfree(numericCholesky);
77 numericCholesky = nullptr;
78 }
79 delete[] csWorkspace;
80 csWorkspace = nullptr;
81 delete[] csIntWorkspace;
82 csIntWorkspace = nullptr;
83 }

References csIntWorkspace, csWorkspace, numericCholesky, and symbolicDecomposition.

Member Function Documentation

◆ prepareWorkspace()

void g2o::csparse::CSparse::Impl::prepareWorkspace ( )
inline

Definition at line 85 of file csparse_wrapper.cpp.

85 {
86 // re-allocate the temporary workspace for cholesky
87 if (csWorkspaceSize < ccsA.n) {
88 csWorkspaceSize = csWorkspaceSize == 0 ? ccsA.n : 2 * ccsA.n;
89 delete[] csWorkspace;
90 csWorkspace = new double[csWorkspaceSize];
91 delete[] csIntWorkspace;
92 csIntWorkspace = new int[2 * csWorkspaceSize];
93 }
94 }

References ccsA, csIntWorkspace, csWorkspace, and csWorkspaceSize.

Member Data Documentation

◆ ccsA

CSparseExt g2o::csparse::CSparse::Impl::ccsA

Definition at line 101 of file csparse_wrapper.cpp.

Referenced by prepareWorkspace().

◆ csIntWorkspace

int* g2o::csparse::CSparse::Impl::csIntWorkspace = nullptr

Definition at line 99 of file csparse_wrapper.cpp.

Referenced by prepareWorkspace(), and ~Impl().

◆ csWorkspace

double* g2o::csparse::CSparse::Impl::csWorkspace = nullptr

Definition at line 98 of file csparse_wrapper.cpp.

Referenced by prepareWorkspace(), and ~Impl().

◆ csWorkspaceSize

int g2o::csparse::CSparse::Impl::csWorkspaceSize = 0

Definition at line 97 of file csparse_wrapper.cpp.

Referenced by prepareWorkspace().

◆ numericCholesky

csn* g2o::csparse::CSparse::Impl::numericCholesky = nullptr

Definition at line 100 of file csparse_wrapper.cpp.

Referenced by ~Impl().

◆ symbolicDecomposition

css* g2o::csparse::CSparse::Impl::symbolicDecomposition = nullptr

Definition at line 96 of file csparse_wrapper.cpp.

Referenced by ~Impl().


The documentation for this class was generated from the following file: