示例#1
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static Half FmaFP32(Half first, Half second, Half third) =>
 (Half)((float)first * second + third);
示例#2
0
 public static ushort FloatAsInt(Half value) =>
 value.RawValue;
示例#3
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static Half MulFP32(Half first, Half second) =>
 (Half)((float)first * second);
示例#4
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static Half DivFP32(Half first, Half second) =>
 (Half)((float)first / second);
示例#5
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static Half AddFP32(Half first, Half second) =>
 (Half)((float)first + second);
示例#6
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static Half SubFP32(Half first, Half second) =>
 (Half)((float)first - second);
示例#7
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static bool IsInfinity(Half half) =>
 (half.RawValue & ExponentMantissaMask) == ExponentMask;
示例#8
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static bool IsFinite(Half half) => !IsNaN(half) & !IsInfinity(half);
示例#9
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static bool IsPositiveInfinity(Half half) =>
 half == Half.PositiveInfinity;
示例#10
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static bool IsNegativeInfinity(Half half) =>
 half == Half.NegativeInfinity;
示例#11
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static bool IsZero(Half half) =>
 (half.RawValue & ExponentMantissaMask) == 0;
示例#12
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static bool IsNaN(Half half) =>
 (half.RawValue & ExponentMantissaMask) > ExponentMask;
示例#13
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static Half Abs(Half half) =>
 new Half((ushort)(half.RawValue & ExponentMantissaMask));
示例#14
0
文件: Half.cs 项目: jgiannuzzi/ILGPU
 public static Half Neg(Half halfValue) =>
 new Half((ushort)(halfValue.RawValue ^ SignBitMask));
示例#15
0
 public static Half Abs(Half value) =>
 Half.Abs(value);