switch root namespace name to NITLOAD

This commit is contained in:
Youmu Liu
2026-09-02 18:15:03 +08:00
parent 4218baad48
commit 7c7101ee48
502 changed files with 710 additions and 721 deletions
@@ -0,0 +1,46 @@
// -----------------------------------------------------------------------------
// file="UnsafeCompute"
// Project: StgSharp
// Copyright (c) Nitload.
// SPDX-License-Identifier: MIT
// -----------------------------------------------------------------------------
using Nitload.Mathematics.Numeric;
using System.Runtime.CompilerServices;
namespace Nitload.Mathematics.Internal
{
public static class UnsafeCompute
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int CityHashSimplify(
char* span,
int length
)
{
return NumericalModule.GlobalContext.city_hash_simplify(span, length);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int CityHashSimplify(
char* span,
int begin,
int length
)
{
return NumericalModule.GlobalContext.city_hash_simplify(span + begin, length);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int IndexOfCharPair(
char* source,
int pairValue,
int length
)
{
return NumericalModule.GlobalContext.index_pair(source, pairValue, length);
}
}
}