- 3.0.2 core module.
TraitSelectorSpecs.h
Go to the documentation of this file.
1 /**********************************************************************************************************************
2 This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich.
3 Licensed under the BSD-2 license (see LICENSE file in main directory)
4 **********************************************************************************************************************/
5 
6 #pragma once
7 
8 #ifdef CPPADCG
9 #include "CppADCodegenTrait.h"
10 #endif
11 #ifdef CPPAD
12 #include "CppADDoubleTrait.h"
13 #endif
15 
16 namespace ct {
17 namespace core {
18 namespace tpl {
19 
20 #ifdef CPPAD
21 template <>
22 struct TraitSelector<CppAD::AD<double>>
23 {
24  typedef internal::CppADDoubleTrait Trait;
25 };
26 #endif
27 
28 #ifdef CPPADCG
29 template <>
30 struct TraitSelector<CppAD::AD<CppAD::cg::CG<double>>>
31 {
32  typedef internal::CppADCodegenTrait Trait;
33 };
34 #endif
35 
36 } // namespace tpl
37 } // namespace core
38 } // namespace ct