Better L4 and array storage design
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// file="MatrixTaskFactory"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// AuthorGroup: Nitload
|
||||
// Copyright (c) Nitload. 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
|
||||
@@ -26,6 +26,7 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Mathematics;
|
||||
using StgSharp.Mathematics.Internal;
|
||||
using StgSharp.Mathematics.Memory;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -74,7 +75,9 @@ namespace StgSharp.Mathematics.Numeric
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe MatrixParallelTask* FromExistPackage(MatrixParallelTask* exist)
|
||||
public static unsafe MatrixParallelTask* FromExistPackage(
|
||||
MatrixParallelTask* exist
|
||||
)
|
||||
{
|
||||
MatrixParallelTask* ptr = (MatrixParallelTask*)_wrapAllocator.Allocate();
|
||||
MatrixParallelTask.Copy(exist, ptr);
|
||||
@@ -83,13 +86,17 @@ namespace StgSharp.Mathematics.Numeric
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
public static void Release(ScalarPacket* source)
|
||||
public static void Release(
|
||||
ScalarPacket* source
|
||||
)
|
||||
{
|
||||
_scalarAllocator.Free((nuint)source);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Release(MatrixParallelTask* source)
|
||||
public static void Release(
|
||||
MatrixParallelTask* source
|
||||
)
|
||||
{
|
||||
if (source->Scalar != null) {
|
||||
_scalarAllocator.Free((nuint)source->Scalar);
|
||||
|
||||
Reference in New Issue
Block a user