From 15c5317f67b111a0762d7b46701b5946c35db33b Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 13 Aug 2024 14:41:11 -0500 Subject: [PATCH] Adolc/Symengine: always instantiate complex valued variants --- .../ad/adolc_number_types.inst.in | 17 ++++----------- .../ad/sacado_number_types.inst1.in | 15 ++----------- .../ad/sacado_number_types.inst2.in | 6 +++--- .../symengine_number_visitor_internal.inst.in | 21 ++++--------------- .../sd/symengine_optimizer.inst.in | 14 +------------ 5 files changed, 14 insertions(+), 59 deletions(-) diff --git a/source/differentiation/ad/adolc_number_types.inst.in b/source/differentiation/ad/adolc_number_types.inst.in index ce17589e31..bb3b795787 100644 --- a/source/differentiation/ad/adolc_number_types.inst.in +++ b/source/differentiation/ad/adolc_number_types.inst.in @@ -32,19 +32,10 @@ for (Number : REAL_SCALARS) \{ template struct NumberTraits; template struct NumberTraits; - \} - \} - } - - -for (Number : COMPLEX_SCALARS) - { - namespace Differentiation - \{ - namespace AD - \{ - template struct NumberTraits; - template struct NumberTraits; + template struct NumberTraits, + NumberTypes::adolc_taped>; + template struct NumberTraits, + NumberTypes::adolc_tapeless>; \} \} } diff --git a/source/differentiation/ad/sacado_number_types.inst1.in b/source/differentiation/ad/sacado_number_types.inst1.in index a80d8e70b7..6093495bfc 100644 --- a/source/differentiation/ad/sacado_number_types.inst1.in +++ b/source/differentiation/ad/sacado_number_types.inst1.in @@ -32,21 +32,10 @@ for (Number : REAL_SCALARS) \{ template struct NumberTraits; template struct NumberTraits; + template struct NumberTraits,NumberTypes::sacado_dfad>; + template struct NumberTraits,NumberTypes::sacado_dfad_dfad>; template struct NumberTraits; template struct NumberTraits; \} \} } - - -for (Number : COMPLEX_SCALARS) -{ - namespace Differentiation - \{ - namespace AD - \{ - template struct NumberTraits; - template struct NumberTraits; - \} - \} -} diff --git a/source/differentiation/ad/sacado_number_types.inst2.in b/source/differentiation/ad/sacado_number_types.inst2.in index 31bbc8ed3e..659c5dba57 100644 --- a/source/differentiation/ad/sacado_number_types.inst2.in +++ b/source/differentiation/ad/sacado_number_types.inst2.in @@ -13,14 +13,14 @@ // ------------------------------------------------------------------------ -for (Number : COMPLEX_SCALARS) +for (Number : REAL_SCALARS) { namespace Differentiation \{ namespace AD \{ - template struct NumberTraits; - template struct NumberTraits; + template struct NumberTraits,NumberTypes::sacado_rad>; + template struct NumberTraits,NumberTypes::sacado_rad_dfad>; \} \} } diff --git a/source/differentiation/sd/symengine_number_visitor_internal.inst.in b/source/differentiation/sd/symengine_number_visitor_internal.inst.in index e0c22e38b2..b037b9935d 100644 --- a/source/differentiation/sd/symengine_number_visitor_internal.inst.in +++ b/source/differentiation/sd/symengine_number_visitor_internal.inst.in @@ -24,23 +24,10 @@ for (number : REAL_SCALARS) template class CSEDictionaryVisitor; template class DictionarySubstitutionVisitor; - - \} - \} - \} - } - -for (number : COMPLEX_SCALARS) - { - namespace Differentiation - \{ - namespace SD - \{ - namespace internal - \{ - - template class CSEDictionaryVisitor; - template class DictionarySubstitutionVisitor; + template class CSEDictionaryVisitor, + SD::Expression>; + template class DictionarySubstitutionVisitor, + SD::Expression>; \} \} diff --git a/source/differentiation/sd/symengine_optimizer.inst.in b/source/differentiation/sd/symengine_optimizer.inst.in index d0052de4bc..51a8363536 100644 --- a/source/differentiation/sd/symengine_optimizer.inst.in +++ b/source/differentiation/sd/symengine_optimizer.inst.in @@ -21,19 +21,7 @@ for (number : REAL_SCALARS) \{ template class BatchOptimizer; - - \} - \} - } - -for (number : COMPLEX_SCALARS) - { - namespace Differentiation - \{ - namespace SD - \{ - - template class BatchOptimizer; + template class BatchOptimizer>; \} \} -- 2.39.5