diff --git a/dotnet/DDS_Core/DDS.cs b/dotnet/DDS_Core/DDS.cs index 94c4403f..adbaa594 100644 --- a/dotnet/DDS_Core/DDS.cs +++ b/dotnet/DDS_Core/DDS.cs @@ -1,9 +1,7 @@ using System.Diagnostics; -using System.Runtime.InteropServices; using System.Text; using DDS_Core.Helpers; using DDS_Core.Native; -using static System.Formats.Asn1.AsnWriter; namespace DDS_Core; @@ -77,9 +75,7 @@ public int SetThreading(in int code) /// Maximum memory in megabytes. /// Maximum number of threads. [Obsolete("Use SolverContext instead.")] - public void SetResources(in int maxMemoryMB, in int maxThreads) - - => DdsNative.SetResources(maxMemoryMB, maxThreads); + public void SetResources(in int maxMemoryMB, in int maxThreads) => DdsNative.SetResources(maxMemoryMB, maxThreads); /// /// Frees memory used by the solver. @@ -189,6 +185,8 @@ public int SolveAllBoards( in BoardsPBN boards public int SolveAllBoards( in Boards bop , out SolvedBoards solved) { + solved = default; + //Note: To step into c++ code you must set a break in c++? var rc = DdsNative.SolveAllBoardsBin( bop , out solved); @@ -290,12 +288,13 @@ public int CalcAllTables( in DdTableDealsPBN dealsp /// and contracts for both North-South and East-West, based on vulnerability. /// /// - /// /// + /// /// public int Par( in DdTableResults table + , in int vulnerable , out ParResults pres - , in int vulnerable) + ) { var rc = DdsNative.Par( table , out pres @@ -362,14 +361,14 @@ public int CalcPar( in DdTableDeal tableDeal /// /// /// - /// Deal represented as card holdings for each hand. + /// Deal represented as a PBN string for each hand. /// + /// + /// Vulnerability (0=None, 1=Both, 2=NS, 3=EW). + /// /// /// Output: double dummy table results. /// - /// /// - /// Vulnerability (0=None, 1=Both, 2=NS, 3=EW). - /// /// /// Output: par score and contract strings. /// @@ -377,8 +376,8 @@ public int CalcPar( in DdTableDeal tableDeal /// Error code (RETURN_NO_FAULT on success). /// public int CalcPar( in DdTableDealPBN tableDealPBN - , out DdTableResults tableResults , in int vulnerable + , out DdTableResults tableResults , out ParResults parResults) { var rc = DdsNative.CalcParPBN( tableDealPBN @@ -394,12 +393,13 @@ public int CalcPar( in DdTableDealPBN tableDealPBN /// Calculates par score and contracts for both sides based on the double dummy table results. /// /// Double dummy table results. - /// Output: par results for both sides. /// Vulnerability (0=None, 1=Both, 2=NS, 3=EW). + /// Output: par results for both sides. /// Error code (RETURN_NO_FAULT on success). public int ParSide( in DdTableResults table + , in int vulnerable , out ParResultsDealers sidesRes - , in int vulnerable) + ) { var rc = DdsNative.SidesPar( table , out sidesRes @@ -413,14 +413,15 @@ public int ParSide( in DdTableResults table /// Calculates par score and contracts for a specific dealer and vulnerability. /// /// - /// /// /// + /// /// public int ParDealer( in DdTableResults table - , out ParResultsDealer pres , in int dealer - , in int vulnerable) + , in int vulnerable + , out ParResultsDealer pres + ) { var rc = DdsNative.DealerPar( table , out pres @@ -435,14 +436,15 @@ public int ParDealer( in DdTableResults table /// Calculates par score and contract types for both sides for a specific dealer and vulnerability. /// /// - /// /// /// + /// /// public int DealerParBothSides( in DdTableResults table - , out ParResultsMaster pres , in int dealer - , in int vulnerable) + , in int vulnerable + , out ParResultsMaster pres + ) { var rc = DdsNative.DealerParBin( table , out pres @@ -457,12 +459,13 @@ public int DealerParBothSides( in DdTableResults table /// calculates par score and contract types for both sides based on the double dummy table results. /// /// Double dummy table results. - /// Output: par results for both sides. /// Vulnerability (0=None, 1=Both, 2=NS, 3=EW). + /// Output: par results for both sides. /// Error code (RETURN_NO_FAULT on success). public int ParAll( in DdTableResults table + , in int vulnerable , out ParResultsMasters sidesRes - , in int vulnerable) + ) { var rc = DdsNative.SidesParBin( table , out sidesRes @@ -479,13 +482,14 @@ public int ParAll( in DdTableResults table /// /// The deal to analyze. /// The play trace to analyze. - /// The result of the analysis, including optimal line and tricks. /// The thread ID for parallel processing. + /// The result of the analysis, including optimal line and tricks. /// Error code (RETURN_NO_FAULT on success). public int AnalysePlay( in Deal dl , in PlayTraceBin play + , in int thrId , out SolvedPlay solved - , in int thrId) + ) { var rc = DdsNative.AnalysePlayBin( dl , in play @@ -500,13 +504,14 @@ public int AnalysePlay( in Deal dl /// /// The PBN deal to analyze. /// The play trace in PBN format to analyze. - /// The result of the analysis, including optimal line and tricks. /// The thread ID for parallel processing. + /// The result of the analysis, including optimal line and tricks. /// Error code (RETURN_NO_FAULT on success). public int AnalysePlay( in DealPBN dlPBN , in PlayTracePBN playPBN + , in int thrId , out SolvedPlay solved - , in int thrId) + ) { var rc = DdsNative.AnalysePlayPBN( dlPBN , in playPBN @@ -521,25 +526,24 @@ public int AnalysePlay( in DealPBN dlPBN /// /// The boards to analyze. /// The play traces to analyze. - /// The result of the analysis, including optimal lines and tricks. /// The chunk size for parallel processing. + /// The result of the analysis, including optimal lines and tricks. /// Error code (RETURN_NO_FAULT on success). public int AnalyseAllPlays( in Boards bop , in PlayTracesBin plp + , in int chunkSize , out SolvedPlays solved - , in int chunkSize) + ) { - - solved = new(); + solved = new(); - var rc = DdsNative.AnalyseAllPlaysBin( bop - , plp - , out solved - , chunkSize); + var rc = DdsNative.AnalyseAllPlaysBin( bop + , plp + , out solved + , chunkSize); - ThrowIfError(rc, nameof(AnalyseAllPlays)); - return rc; - + ThrowIfError(rc, nameof(AnalyseAllPlays)); + return rc; } /// @@ -547,13 +551,14 @@ public int AnalyseAllPlays( in Boards bop /// /// The boards in PBN format to analyze. /// The play traces in PBN format to analyze. - /// The result of the analysis, including optimal lines and tricks. /// The chunk size for parallel processing. + /// The result of the analysis, including optimal lines and tricks. /// Error code (RETURN_NO_FAULT on success). public int AnalyseAllPlays( in BoardsPBN bopPBN , in PlayTracesPBN plpPBN + , in int chunkSize , out SolvedPlays solved - , in int chunkSize) + ) { solved = new(); var rc = DdsNative.AnalyseAllPlaysPBN( bopPBN @@ -621,17 +626,14 @@ public void ErrorMessage( in int code DdsNative.ErrorMessage(code, str); line = str.ToString(); } - - #endregion #region private methods + [Conditional("DEBUG")] private static void ThrowIfError(in int result, in string functionName) { -#if DEBUG if (result != (int)SolveBoardResult.NoFault) throw new InvalidOperationException($"{functionName} failed with code {result}: {result.GetRCErrorMessage()}"); -#endif } #endregion } diff --git a/dotnet/DDS_Core/DataModel/SolverContext.cs b/dotnet/DDS_Core/DataModel/SolverContext.cs index 9c2c2f14..bdf29cc7 100644 --- a/dotnet/DDS_Core/DataModel/SolverContext.cs +++ b/dotnet/DDS_Core/DataModel/SolverContext.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; +using System.Diagnostics; using DDS_Core.Helpers; using DDS_Core.Native; @@ -66,17 +61,17 @@ public int SolveBoard( in Deal dl #region CalcDdTable - Double Dummy Table and Par public int CalcDdTable(in DdTableDeal table_deal, out DdTableResults table_results) { - var rc = DdsNative.calc_ddtable( Handle + var rc = DdsNative.dds_calc_dd_table( Handle , in table_deal , out table_results); - ThrowIfError(rc, nameof(SolveBoard)); + ThrowIfError(rc, nameof(CalcDdTable)); return rc; } public int CalcDdTable(in DdTableDealPBN table_deal_pbn, out DdTableResults table_results) { - var rc = DdsNative.calc_ddtable_pbn( Handle + var rc = DdsNative.dds_calc_dd_table_pbn( Handle , in table_deal_pbn , out table_results); @@ -117,7 +112,7 @@ public int CalcPar( in DdTableDeal table_deal , out DdTableResults table_results , out ParResults par_results) { - var rc = DdsNative.calc_par( Handle + var rc = DdsNative.dds_calc_par( Handle , in table_deal , vulnerable , out table_results @@ -142,12 +137,11 @@ public int CalcPar( in DdTableDeal table_deal #endregion #region private methods + [Conditional("DEBUG")] private static void ThrowIfError(int result, string functionName) { -#if DEBUG if (result != (int)SolveBoardResult.NoFault) throw new InvalidOperationException($"{functionName} failed with code {result}: {result.GetRCErrorMessage()}"); -#endif } #endregion } diff --git a/dotnet/DDS_Core/Helpers/SolverContextHandle.cs b/dotnet/DDS_Core/Helpers/SolverContextHandle.cs index 20011ceb..f2f09dd5 100644 --- a/dotnet/DDS_Core/Helpers/SolverContextHandle.cs +++ b/dotnet/DDS_Core/Helpers/SolverContextHandle.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection.Metadata; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.InteropServices; using DDS_Core.Native; namespace DDS_Core; diff --git a/dotnet/DDS_Core/Native/DdsNative.cs b/dotnet/DDS_Core/Native/DdsNative.cs index 68910a82..9ee2c487 100644 --- a/dotnet/DDS_Core/Native/DdsNative.cs +++ b/dotnet/DDS_Core/Native/DdsNative.cs @@ -1,7 +1,5 @@ -using System; -using System.Runtime.InteropServices; +using System.Runtime.InteropServices; using System.Text; -using static System.Net.WebRequestMethods; namespace DDS_Core.Native; @@ -59,18 +57,18 @@ public static extern int dds_solve_board( SolverContextHandle ctx #region Call_dd // [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] - //public static extern int calc_ddtable( in DdTableDeal table_deal + //public static extern int dds_calc_dd_table( in DdTableDeal table_deal // , out DdTableResults table_results); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] - public static extern int calc_ddtable( SolverContextHandle ctx + public static extern int dds_calc_dd_table( SolverContextHandle ctx , in DdTableDeal table_deal , out DdTableResults table_results); // [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] - //public static extern int calc_dd_table_pbn( in DdTableDealPBN table_deal_pbn + //public static extern int dds_calc_dd_table_pbn( in DdTableDealPBN table_deal_pbn // , out DdTableResults table_results); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] - public static extern int calc_ddtable_pbn( SolverContextHandle ctx + public static extern int dds_calc_dd_table_pbn( SolverContextHandle ctx , in DdTableDealPBN table_deal_pbn , out DdTableResults table_results); #endregion @@ -82,7 +80,7 @@ public static extern int calc_ddtable_pbn( SolverContextHandle ctx // , out DdTableResults table_results // , out ParResults par_results); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] - public static extern int calc_par( SolverContextHandle ctx + public static extern int dds_calc_par( SolverContextHandle ctx , in DdTableDeal table_deal , int vulnerable , out DdTableResults table_results diff --git a/dotnet/DDS_Core_Demo/Program.cs b/dotnet/DDS_Core_Demo/Program.cs index 851487a7..166091ce 100644 --- a/dotnet/DDS_Core_Demo/Program.cs +++ b/dotnet/DDS_Core_Demo/Program.cs @@ -1,12 +1,5 @@ -using System.ComponentModel; -using System.Diagnostics; -using System.Net; -using System.Text; -using System.Transactions; +using System.Diagnostics; using DDS_Core; -using Microsoft.Win32.SafeHandles; -using static System.Net.Mime.MediaTypeNames; -using static DDS_Core.CardRanks; namespace DDS_Core_Demo; @@ -97,9 +90,10 @@ static void Main(string[] args) doSolveBoardV3(dds, ctx, TestData.deals[0]); doCalcDdTableV3(dds, ctx, TestData.ddTableDeal); doCalcDdTableV3(dds, ctx, TestData.ddTableDealPBN); - ctx.LogAppend("Completed V3.0.0 samples"); - //ctx.LogClear(); - } + doCalcParV3(dds, ctx, TestData.ddTableDeal, vulnability); + ctx.LogAppend("Completed V3.0.0 samples"); + //ctx.LogClear(); + } #endregion Console.WriteLine($"Press any key to continue..."); @@ -141,9 +135,10 @@ private static void doSolveBoardV3(DDS dds, SolverContext ctx, Deal deal) // record the number of tricks for declarer tricks[deal.Trump, decl] = 13 - fut.Score[0]; - dds.FreeMemory(); + ctx.ResetForSolve(); } + DisplayTricks(); } @@ -312,7 +307,6 @@ private static void doCalcDdTableV3(DDS dds, SolverContext ctx, DdTableDeal ddTa } ctx.ResetForSolve(); - //dds.FreeMemory(); DisplayTricks(); } @@ -359,7 +353,6 @@ private static void doCalcDdTableV3(DDS dds, SolverContext ctx, DdTableDealPBN d } ctx.ResetForSolve(); - //dds.FreeMemory(); DisplayTricks(); TestData.ddTableResults = results; @@ -399,10 +392,10 @@ private static void doCalcAllTables(DDS dds, DdTableDealsPBN ddTableDeals) intArray5 trumpFilter = new(); var rc = dds.CalcAllTables( in ddTableDeals - , 0 - , trumpFilter - , out DdTablesResult results - , out AllParResults presp); + , 0 + , trumpFilter + , out DdTablesResult results + , out AllParResults presp); for (var trump = 0; trump < 5; trump++) @@ -425,8 +418,8 @@ private static void doPar(DDS dds, DdTableResults tableResults, int vulnability) tricks = new int[5, 4]; var rc = dds.Par( in tableResults - , out ParResults results - , vulnability); + , vulnability , out ParResults results +); Console.WriteLine(results.ParContractStrings); Console.WriteLine(results.ParScores); @@ -435,12 +428,12 @@ private static void doPar(DDS dds, DdTableResults tableResults, int vulnability) Console.WriteLine(); } - private static void doCalcPar(DDS dds, DdTableDeal ddTableDeal, int vulnability) + private static void doCalcParV3(DDS dds, SolverContext ctx, DdTableDeal ddTableDeal, int vulnability) { - Console.WriteLine($"CalcPar"); + Console.WriteLine($"CalcPar V3"); tricks = new int[5, 4]; - var rc = dds.CalcPar( in ddTableDeal + var rc = ctx.CalcPar( in ddTableDeal , vulnability , out DdTableResults tResults , out ParResults results ); @@ -457,48 +450,48 @@ private static void doCalcPar(DDS dds, DdTableDeal ddTableDeal, int vulnability) tricks[trump, decl] = tResults.ResultsTable[trump, decl]; } - dds.FreeMemory(); - + ctx.ResetForSolve(); DisplayTricks(); - //Console.WriteLine(); } - private static void doCalcParV3(DDS dds, SolverContext ctx, DdTableDeal ddTableDeal) + private static void doCalcPar(DDS dds, DdTableDeal ddTableDeal, int vulnability) { - Console.WriteLine($"CalcParV3"); + Console.WriteLine($"CalcPar"); tricks = new int[5, 4]; - var rc = ctx.CalcPar( in ddTableDeal - , 0 + var rc = dds.CalcPar( in ddTableDeal + , vulnability , out DdTableResults tResults , out ParResults results ); Console.WriteLine(results.ParContractStrings); Console.WriteLine(results.ParScores); - //for (var trump = 0; trump < 5; trump++) - // for (var first = 0; first < 4; first++) - // { - // var decl =(first + 3) & 3; + for (var trump = 0; trump < 5; trump++) + for (var first = 0; first < 4; first++) + { + var decl =(first + 3) & 3; + + // record the number of tricks for declarer + tricks[trump, decl] = tResults.ResultsTable[trump, decl]; + } - // // record the number of tricks for declarer - // tricks[trump, decl] = tResults.ResultsTable[trump, decl]; - // } - ctx.ResetForSolve(); - //dds.FreeMemory(); - //DisplayTricks(); - Console.WriteLine(); + dds.FreeMemory(); + + DisplayTricks(); + //Console.WriteLine(); } + private static void doCalcPar(DDS dds, DdTableDealPBN ddTableDeal, int vulnability) { Console.WriteLine($"CalcPar PBN"); tricks = new int[5, 4]; var rc = dds.CalcPar( in ddTableDeal - , out DdTableResults tResults - , vulnability - , out ParResults results ); + , vulnability + , out DdTableResults tResults + , out ParResults results ); Console.WriteLine(results.ParContractStrings); Console.WriteLine(results.ParScores); @@ -524,8 +517,8 @@ private static void doParSide(DDS dds, DdTableResults tResults, int vulnability) tricks = new int[5, 4]; var rc = dds.ParSide( in tResults - , out ParResultsDealers results - , vulnability); + , vulnability , out ParResultsDealers results +); Console.WriteLine(results[0].NumberOfContracts); Console.WriteLine(results[0].Score); @@ -546,8 +539,8 @@ private static void doParAll(DDS dds, DdTableResults tResults, int vulnability) tricks = new int[5, 4]; var rc = dds.ParAll( in tResults - , out ParResultsMasters results - , vulnability); + , vulnability , out ParResultsMasters results +); for (int s = 0; s < 2; s++) { @@ -582,9 +575,9 @@ private static void doParDealer(DDS dds, DdTableResults tResults, int dealer, in tricks = new int[5, 4]; var rc = dds.ParDealer( in tResults - , out ParResultsDealer results , dealer , vulnability + , out ParResultsDealer results ); Console.WriteLine(results.NumberOfContracts); @@ -602,9 +595,9 @@ private static void doParDealerBothSides( DDS dds, DdTableResults tResults, int tricks = new int[5, 4]; var rc = dds.DealerParBothSides( in tResults - , out ParResultsMaster results , dealer - , vulnability); + , vulnability , out ParResultsMaster results +); Console.WriteLine(results.Number); Console.WriteLine(results.Score); @@ -647,8 +640,8 @@ private static void doAnalysePlay(DDS dds, Deal deal, ParResultsMasters tResults var rc = dds.AnalysePlay( in deal , in ptrace - , out SolvedPlay solved - , 0); + , 0 , out SolvedPlay solved +); for (int i = 0; i <= ptrace.NumberOfCards; i++) Console.WriteLine($"{i,2}: {solved.Tricks[i]}"); @@ -662,9 +655,9 @@ private static void doAnalysePlay(DDS dds, DealPBN deal, ParResultsMasters tResu Console.WriteLine($"AnalysePlay PlayTracePBN"); var rc = dds.AnalysePlay( in deal - , in ptrace - , out SolvedPlay solved - , 0); + , in ptrace + , 0 , out SolvedPlay solved +); for (int i = 0; i <= ptrace.NumberOfPlayedCards; i++) Console.WriteLine($"{i,2}: {solved.Tricks[i]}"); @@ -680,8 +673,8 @@ private static void doAnalyseAllPlays(DDS dds, Boards boards, PlayTracesBin ptra var rc = dds.AnalyseAllPlays( in boards , in ptrace - , out SolvedPlays solved - , 0); + , 0 , out SolvedPlays solved +); if (isPerformanceTest) { @@ -700,8 +693,8 @@ private static void doAnalyseAllPlays(DDS dds, BoardsPBN boards, PlayTracesPBN p var rc = dds.AnalyseAllPlays( in boards , in ptrace - , out SolvedPlays solved - , 0); + , 0 , out SolvedPlays solved +); for (int i = 0; i <= ptrace.Plays[0].NumberOfPlayedCards; i++) Console.WriteLine($"{i,2}: {solved.Solved[0].Tricks[i]}"); @@ -771,6 +764,7 @@ private static void BenchmarkAnalyseAllPlaysBin(DDS dds) Console.WriteLine("\n=== Benchmark Complete ==="); Console.Out.Flush(); } + catch (Exception ex) { Console.WriteLine($"\nERROR: {ex.GetType().Name}: {ex.Message}"); @@ -792,7 +786,7 @@ private static double BenchmarkVariant1(DDS dds, Boards boards, PlayTracesBin pl GC.Collect(); for (int i = 0; i < 5; i++) - dds.AnalyseAllPlays(in boards, in playTracesBin, out SolvedPlays solved, 0); + dds.AnalyseAllPlays(in boards, in playTracesBin, 0, out SolvedPlays solved); dds.FreeMemory(); @@ -803,7 +797,7 @@ private static double BenchmarkVariant1(DDS dds, Boards boards, PlayTracesBin pl for (int i = 0; i < iterations; i++) { - dds.AnalyseAllPlays(in boards, in playTracesBin, out SolvedPlays solved, 0); + dds.AnalyseAllPlays(in boards, in playTracesBin, 0, out SolvedPlays solved); dds.FreeMemory(); } @@ -818,7 +812,6 @@ private static double BenchmarkVariant1(DDS dds, Boards boards, PlayTracesBin pl return opsPerSecond; } - catch (Exception ex) { Console.WriteLine($"ERROR in Variant1: {ex.Message}"); diff --git a/library/src/api/calc_par.hpp b/library/src/api/calc_par.hpp index 6a2aeda3..5dc3ebb5 100644 --- a/library/src/api/calc_par.hpp +++ b/library/src/api/calc_par.hpp @@ -59,7 +59,7 @@ auto calc_par( * @param par_results Output: par score and contract strings * @return Error code (RETURN_NO_FAULT on success) */ -DLLEXPORT auto calc_par( + auto calc_par( SolverContext& ctx, const DdTableDeal& table_deal, int vulnerable, diff --git a/library/src/api/dds_api.hpp b/library/src/api/dds_api.hpp index ef0226f2..92c6589f 100644 --- a/library/src/api/dds_api.hpp +++ b/library/src/api/dds_api.hpp @@ -46,15 +46,23 @@ extern "C" { int mode, FutureTricks* futp) -> int; - EXTERN_C DLLEXPORT auto calc_ddtable( + EXTERN_C DLLEXPORT auto dds_calc_dd_table( DDS_SOLVER_CTX ctx, const DdTableDeal& table_deal, DdTableResults* table_results) -> int; - EXTERN_C DLLEXPORT auto calc_ddtable_pbn( + EXTERN_C DLLEXPORT auto dds_calc_dd_table_pbn( DDS_SOLVER_CTX ctx, const DdTableDealPBN& table_deal, DdTableResults* table_results) -> int; + EXTERN_C DLLEXPORT auto dds_calc_par( + DDS_SOLVER_CTX ctx, + const DdTableDeal& table_deal, + int vulnerable, + DdTableResults* table_results, + ParResults* par_results) -> int; + + } diff --git a/library/src/dds_api.cpp b/library/src/dds_api.cpp index a4a8cc82..a10973a6 100644 --- a/library/src/dds_api.cpp +++ b/library/src/dds_api.cpp @@ -6,6 +6,7 @@ */ #include +#include // Creation DLLEXPORT DDS_SOLVER_CTX dds_create_solvercontext_default() @@ -73,13 +74,24 @@ DLLEXPORT auto dds_solve_board(DDS_SOLVER_CTX ctx, const Deal& dl, int target, i futp); } -DLLEXPORT auto calc_ddtable(DDS_SOLVER_CTX ctx, const DdTableDeal& table_deal, DdTableResults* table_results) -> int +DLLEXPORT auto dds_calc_dd_table(DDS_SOLVER_CTX ctx, const DdTableDeal& table_deal, DdTableResults* table_results) -> int { return calc_dd_table(*ctx, table_deal, table_results); } -DLLEXPORT auto calc_ddtable_pbn(DDS_SOLVER_CTX ctx, const DdTableDealPBN& table_deal, DdTableResults* table_results) -> int +DLLEXPORT auto dds_calc_dd_table_pbn(DDS_SOLVER_CTX ctx, const DdTableDealPBN& table_deal, DdTableResults* table_results) -> int { return calc_dd_table_pbn(*ctx, table_deal, table_results); } + +DLLEXPORT auto dds_calc_par( + DDS_SOLVER_CTX ctx, + const DdTableDeal& table_deal, + int vulnerable, + DdTableResults* table_results, + ParResults* par_results) -> int +{ + return calc_par(*ctx, table_deal, vulnerable, table_results, par_results); +} +