Pass large structs byref instead

This commit is contained in:
Asriel Camora
2023-11-10 18:41:58 -08:00
parent 3edb156d97
commit 036cbb2fb4
9 changed files with 21 additions and 27 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
using System.Runtime.InteropServices;
using System.Runtime.InteropServices;
namespace Craftimizer.Solver;
@@ -21,7 +21,7 @@ public readonly record struct MCTSConfig
public float ScoreCP { get; init; }
public float ScoreSteps { get; init; }
public MCTSConfig(SolverConfig config)
public MCTSConfig(in SolverConfig config)
{
MaxStepCount = config.MaxStepCount;
MaxRolloutStepCount = config.MaxRolloutStepCount;