Enhance mathematical capabilities and job system
Added new numeric types for unsigned integers, including uint2, uint3, and uint4, along with their matrix types. Added a new `quaternion` struct with constructors and methods for creating and manipulating quaternions. Added methods for projecting and reflecting vectors, enhancing geometric operations. Added utility functions for generating orthonormal bases and changing vector signs. Added comprehensive unit tests for new mathematical functions and quaternion operations. Added a high-performance job scheduling system with job management features and worker thread management. Added new structs for job execution, allowing efficient job scheduling and execution. Added utility functions for job execution, including methods for obtaining unique job IDs. Changed access modifiers and property definitions in several files for improved clarity and maintainability. Changed property definitions and method implementations in `ImageInfo.cs`, `ImageResult.cs`, and `ImageResultFloat.cs` for better readability. Changed memory management functions in `CRuntime.cs` and improved memory allocation tracking in `MemoryStats.cs`. Changed the project file to include references to necessary projects and enable unsafe code blocks. Removed the `WorkerThreadPool.cs` file, integrating worker thread management directly into the `JobScheduler`. Removed the `float4` struct and its associated methods and properties, transitioning to a new code generation strategy. Removed the `float4.tt` template and other related files, indicating a shift in code generation approach. Removed the `Vectorize.cs` file, indicating a change in how vector operations are handled. Updated the `.gitignore` file to include IDE-specific settings. Updated various XML files to define project components and structure. Updated the `AllocationManager.cs` to improve memory allocation management and introduce new strategies. Updated the `UnsafeArray.cs`, `UnsafeHashMap.cs`, and `UnsafeList.cs` to enhance performance and safety in unsafe contexts. Updated error handling and function pointer management in `MemoryLeakException.cs` and `FunctionPointer.cs`. Updated the `AssemblyInfo.cs` file to include global using directives for better code organization.
This commit is contained in:
@@ -1,16 +1,7 @@
|
||||
namespace Misaki.HighPerformance.LowLevel.Collections.Contracts;
|
||||
|
||||
public unsafe interface IUnsafeCollection<T> : IEnumerable<T>, IDisposable
|
||||
where T : unmanaged
|
||||
public unsafe interface IUnsafeCollection : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the number of elements in a collection. The value is read-only.
|
||||
/// </summary>
|
||||
public int Count
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the object has been created. Returns true if the object is created, otherwise false.
|
||||
/// </summary>
|
||||
@@ -24,15 +15,41 @@ public unsafe interface IUnsafeCollection<T> : IEnumerable<T>, IDisposable
|
||||
/// </summary>
|
||||
public void Clear();
|
||||
|
||||
/// <summary>
|
||||
/// Changes the size of a collection or array to the specified value.
|
||||
/// </summary>
|
||||
/// <param name="newSize">Specifies the new size to which the collection or array should be adjusted.</param>
|
||||
public void Resize(int newSize);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a pointer to an unmanaged memory location. This pointer can be used for low-level memory operations.
|
||||
/// </summary>
|
||||
/// <returns>The method returns a void pointer to the unsafe memory location.</returns>
|
||||
public void* GetUnsafePtr();
|
||||
}
|
||||
|
||||
public unsafe interface IUnsafeCollection<T> : IUnsafeCollection, IEnumerable<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the number of elements in a collection. The value is read-only.
|
||||
/// </summary>
|
||||
public int Count
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the size of a collection to the specified value.
|
||||
/// </summary>
|
||||
/// <param name="newSize">Specifies the new size to which the collection should be adjusted.</param>
|
||||
public void Resize(int newSize);
|
||||
}
|
||||
|
||||
public unsafe interface IUnTypedCollection : IUnsafeCollection
|
||||
{
|
||||
/// <summary>
|
||||
/// The total size of the buffer in bytes.
|
||||
/// </summary>
|
||||
public uint Size
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public ref T GetElementAt<T>(uint index)
|
||||
where T : unmanaged;
|
||||
}
|
||||
Reference in New Issue
Block a user