swiss ok, needs more benchmark
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// file="UnsafeCompute"
|
||||
// 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
|
||||
@@ -25,6 +25,7 @@
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Mathematics.Numeric;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace StgSharp.Mathematics.Internal
|
||||
@@ -33,19 +34,30 @@ namespace StgSharp.Mathematics.Internal
|
||||
{
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe int CityHashSimplify(char* span, int length)
|
||||
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)
|
||||
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)
|
||||
public static unsafe int IndexOfCharPair(
|
||||
char* source,
|
||||
int pairValue,
|
||||
int length
|
||||
)
|
||||
{
|
||||
return NumericalModule.GlobalContext.index_pair(source, pairValue, length);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user