AC_LANG_POP([C++])
AC_SUBST([CVC4_NEED_INT64_T_OVERLOADS])
+AC_MSG_CHECKING([for the pb_ds namespace])
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#include <ext/pb_ds/priority_queue.hpp>
+typedef pb_ds::priority_queue<void, void, void> pq;])],
+ [CVC4_PB_DS_NAMESPACE=pb_ds],
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #include <ext/pb_ds/priority_queue.hpp>
+ typedef __gnu_pbds::priority_queue<void, void, void> pq;])],
+ [CVC4_PB_DS_NAMESPACE=__gnu_pbds],
+ [AC_MSG_ERROR([can't find required priority_queue in either __gnu_pbds or pb_ds namespace])])])
+AC_LANG_POP([C++])
+AC_DEFINE_UNQUOTED(CVC4_PB_DS_NAMESPACE, ${CVC4_PB_DS_NAMESPACE}, [The namespace for pb_ds data structures.])
+AC_MSG_RESULT([$CVC4_PB_DS_NAMESPACE])
+
# Check for ANTLR runantlr script (defined in config/antlr.m4)
AC_PROG_ANTLR
//
// typedef FocusSet::handle_type FocusSetHandle;
-typedef __gnu_pbds::priority_queue<
+typedef CVC4_PB_DS_NAMESPACE::priority_queue<
ArithVar,
ComparatorPivotRule,
- __gnu_pbds::pairing_heap_tag> FocusSet;
+ CVC4_PB_DS_NAMESPACE::pairing_heap_tag> FocusSet;
typedef FocusSet::point_iterator FocusSetHandle;
LinearEqualityModule::UpdatePreferenceFunction selectLeavingFunction(ArithVar x){
bool useBlands = d_leavingCountSinceImprovement.isKey(x) &&
d_leavingCountSinceImprovement[x] >= s_maxDegeneratePivotsBeforeBlandsOnEntering;
- return useBlands ?
- &LinearEqualityModule::preferWitness<false>:
- &LinearEqualityModule::preferWitness<true>;
+ if(useBlands) {
+ return &LinearEqualityModule::preferWitness<false>;
+ } else {
+ return &LinearEqualityModule::preferWitness<true>;
+ }
}
bool debugDualLike(WitnessImprovement w, std::ostream& out,
UpdateInfo selectUpdateForPrimal(ArithVar basic, bool useBlands){
TimerStat::CodeTimer codeTimer(d_statistics.d_selectUpdateForPrimal);
- LinearEqualityModule::UpdatePreferenceFunction upf = useBlands ?
- &LinearEqualityModule::preferWitness<false>:
- &LinearEqualityModule::preferWitness<true>;
+ LinearEqualityModule::UpdatePreferenceFunction upf;
+ if(useBlands) {
+ upf = &LinearEqualityModule::preferWitness<false>;
+ } else {
+ upf = &LinearEqualityModule::preferWitness<true>;
+ }
LinearEqualityModule::VarPreferenceFunction bpf = useBlands ?
&LinearEqualityModule::minVarOrder :
Assert(d_soiVar != ARITHVAR_SENTINEL);
bool useBlands = degeneratePivotsInARow() >= s_maxDegeneratePivotsBeforeBlandsOnLeaving;
- LinearEqualityModule::UpdatePreferenceFunction upf = useBlands ?
- &LinearEqualityModule::preferWitness<false>:
- &LinearEqualityModule::preferWitness<true>;
+ LinearEqualityModule::UpdatePreferenceFunction upf;
+ if(useBlands) {
+ upf = &LinearEqualityModule::preferWitness<false>;
+ } else {
+ upf = &LinearEqualityModule::preferWitness<true>;
+ }
LinearEqualityModule::VarPreferenceFunction bpf = useBlands ?
&LinearEqualityModule::minVarOrder :
LinearEqualityModule::UpdatePreferenceFunction selectLeavingFunction(ArithVar x){
bool useBlands = d_leavingCountSinceImprovement.isKey(x) &&
d_leavingCountSinceImprovement[x] >= s_maxDegeneratePivotsBeforeBlandsOnEntering;
- return useBlands ?
- &LinearEqualityModule::preferWitness<false>:
- &LinearEqualityModule::preferWitness<true>;
+ if(useBlands) {
+ return &LinearEqualityModule::preferWitness<false>;
+ } else {
+ return &LinearEqualityModule::preferWitness<true>;
+ }
}
bool debugSOI(WitnessImprovement w, std::ostream& out, int instance) const;