Wildmeshing Toolkit
AutoDiffRAII.cpp
Go to the documentation of this file.
1
#include "
AutoDiffRAII.hpp
"
2
#include "
autodiff.h
"
3
4
namespace
wmtk::function::utils
{
5
AutoDiffRAII::AutoDiffRAII
(
size_t
size)
6
: m_previous_variable_count(
DiffScalarBase
::getVariableCount())
7
{
8
DiffScalarBase::setVariableCount
(size);
9
}
10
AutoDiffRAII::~AutoDiffRAII
()
11
{
12
DiffScalarBase::setVariableCount
(
m_previous_variable_count
);
13
}
14
}
// namespace wmtk::function::utils
AutoDiffRAII.hpp
autodiff.h
wmtk::function::utils::AutoDiffRAII::AutoDiffRAII
AutoDiffRAII(size_t size)
Definition:
AutoDiffRAII.cpp:5
wmtk::function::utils::AutoDiffRAII::~AutoDiffRAII
~AutoDiffRAII()
Definition:
AutoDiffRAII.cpp:10
wmtk::function::utils::AutoDiffRAII::m_previous_variable_count
size_t m_previous_variable_count
Definition:
AutoDiffRAII.hpp:15
wmtk::function::utils
Definition:
amips.cpp:5
DiffScalarBase
Base class of all automatic differentiation types.
Definition:
autodiff.h:44
DiffScalarBase::setVariableCount
static void setVariableCount(size_t value)
Set the independent variable count used by the automatic differentiation layer.
Definition:
autodiff.h:57
src
wmtk
function
utils
AutoDiffRAII.cpp
Generated by
1.9.1