matrix pool init ok, working on task publish

This commit is contained in:
Nitload
2026-03-30 01:42:09 +08:00
parent 61303635ad
commit 24498c2717
9 changed files with 220 additions and 208 deletions
@@ -2,8 +2,8 @@
// -----------------------------------------------------------------------
// file="MatrixParallelTask"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -32,6 +32,16 @@ using System.Runtime.InteropServices;
namespace StgSharp.Mathematics.Numeric.Runtime
{
[StructLayout(LayoutKind.Sequential)]
internal struct MatrixParallelSource
{
public MatrixParallelTask Task;
public ulong Count;
public ulong Cursor;
}
[StructLayout(LayoutKind.Explicit)]
internal unsafe struct MatrixParallelTask
{
@@ -56,13 +66,9 @@ namespace StgSharp.Mathematics.Numeric.Runtime
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Copy(
MatrixParallelTask* source,
MatrixParallelTask* target
)
public static void Copy(MatrixParallelTask* source, MatrixParallelTask* target)
{
Buffer.MemoryCopy(source, target, sizeof(MatrixParallelTask),
sizeof(MatrixParallelTask));
Buffer.MemoryCopy(source, target, sizeof(MatrixParallelTask), sizeof(MatrixParallelTask));
}
}