Merge pull request #12 from mlemanczyk/codex/analyze-and-propose-fixes-for-evenperfectbitscanner-exceptio
Ensure GPU residue copy completes before buffer disposal
This commit is contained in:
1 file changed
+1
@@ -58,6 +58,7 @@ public class MersenneNumberResidueGpuTester(bool useGpuOrder)
|
|||||||
|
|
||||||
accelerator.Synchronize();
|
accelerator.Synchronize();
|
||||||
orderBuffer.View.CopyToCPU(ref MemoryMarshal.GetReference(orders), currentSize);
|
orderBuffer.View.CopyToCPU(ref MemoryMarshal.GetReference(orders), currentSize);
|
||||||
|
accelerator.Synchronize();
|
||||||
if (!Volatile.Read(ref isPrime))
|
if (!Volatile.Read(ref isPrime))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user