30 lines
941 B
C#
30 lines
941 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Text;
|
|
|
|
namespace StgSharp.Intrinsic
|
|
{
|
|
public static class UnsafeCompute
|
|
{
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static unsafe int IndexOfCharPair(char* source, int pairValue, int length)
|
|
{
|
|
return InternalIO.Intrinsic.index_pair(source, pairValue, length);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static unsafe int CityHashSimplify(char* span, int length)
|
|
{
|
|
return InternalIO.Intrinsic.city_hash_simplify(span,length);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static unsafe int CityHashSimplify(char* span, int begin, int length)
|
|
{
|
|
return InternalIO.Intrinsic.city_hash_simplify(span + begin, length);
|
|
}
|
|
}
|
|
}
|