mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
210
Brutal.Numerics/Vector/uint4/uint4.pack.gen.cs
Normal file
210
Brutal.Numerics/Vector/uint4/uint4.pack.gen.cs
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
// <auto-generated /> - edit Vector.pack.tt to modify
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.Numerics;
|
||||
|
||||
public partial struct uint4
|
||||
{
|
||||
public static uint4 Unpack(in sbyte4 vector, Func<sbyte, uint> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out uint4 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static uint4 Unpack(in byte4 vector, Func<byte, uint> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out uint4 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static uint4 Unpack(in short4 vector, Func<short, uint> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out uint4 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static uint4 Unpack(in ushort4 vector, Func<ushort, uint> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out uint4 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static uint4 Unpack(in int4 vector, Func<int, uint> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out uint4 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static uint4 Pack(in float4 vector, Func<float, uint> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out uint4 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static uint4 Pack(in double4 vector, Func<double, uint> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out uint4 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static uint4 Unpack(in sbyte4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.SByte.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static uint4 Unpack(in byte4 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.Byte.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static uint4 Unpack(in short4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.Short.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static uint4 Unpack(in ushort4 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.UShort.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static uint4 Unpack(in int4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.Int.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static uint4 Pack(in float4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate)
|
||||
{
|
||||
return Pack(vector, PackUtils.Float.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static uint4 Pack(in double4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate)
|
||||
{
|
||||
return Pack(vector, PackUtils.Double.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<sbyte4> source,
|
||||
Span<uint4> destination,
|
||||
Func<sbyte, uint> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<byte4> source,
|
||||
Span<uint4> destination,
|
||||
Func<byte, uint> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<short4> source,
|
||||
Span<uint4> destination,
|
||||
Func<short, uint> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<ushort4> source,
|
||||
Span<uint4> destination,
|
||||
Func<ushort, uint> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<int4> source,
|
||||
Span<uint4> destination,
|
||||
Func<int, uint> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void PackSpan(
|
||||
in ReadOnlySpan<float4> source,
|
||||
Span<uint4> destination,
|
||||
Func<float, uint> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void PackSpan(
|
||||
in ReadOnlySpan<double4> source,
|
||||
Span<uint4> destination,
|
||||
Func<double, uint> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<sbyte4> source,
|
||||
Span<uint4> destination,
|
||||
Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.SByte.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<byte4> source,
|
||||
Span<uint4> destination,
|
||||
Unpack.Integer mode = Numerics.Unpack.Integer.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.Byte.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<short4> source,
|
||||
Span<uint4> destination,
|
||||
Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.Short.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<ushort4> source,
|
||||
Span<uint4> destination,
|
||||
Unpack.Integer mode = Numerics.Unpack.Integer.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.UShort.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<int4> source,
|
||||
Span<uint4> destination,
|
||||
Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.Int.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static void PackSpan(
|
||||
in ReadOnlySpan<float4> source,
|
||||
Span<uint4> destination,
|
||||
Pack.Float mode = Numerics.Pack.Float.Truncate
|
||||
)
|
||||
{
|
||||
PackSpan(source, destination, PackUtils.Float.ToUInt(mode));
|
||||
}
|
||||
|
||||
public static void PackSpan(
|
||||
in ReadOnlySpan<double4> source,
|
||||
Span<uint4> destination,
|
||||
Pack.Float mode = Numerics.Pack.Float.Truncate
|
||||
)
|
||||
{
|
||||
PackSpan(source, destination, PackUtils.Double.ToUInt(mode));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue