forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfloat16.natvis
15 lines (13 loc) · 1.27 KB
/
float16.natvis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="FLOAT16">
<DisplayString Condition = "format.exponent == 0 && format.significand == 0 && format.sign == 0">+0</DisplayString>
<DisplayString Condition = "format.exponent == 0 && format.significand == 0 && format.sign == 1">-0</DisplayString>
<DisplayString Condition = "format.exponent == 31 && format.significand == 0 && format.sign == 0">+infinity</DisplayString>
<DisplayString Condition = "format.exponent == 31 && format.significand == 0 && format.sign == 1">-infinity</DisplayString>
<DisplayString Condition = "format.exponent == 31">NaN</DisplayString>
<DisplayString Condition = "format.exponent == 0">{ (1.0f / (1 << 14)) * (-2*format.sign+1.0f) * (format.significand/1024.0f) }</DisplayString>
<DisplayString Condition = "format.exponent < 15">{ (1.0f / (1 << (15-format.exponent))) * (-2*format.sign+1.0f) * (1.0f + format.significand/1024.0f) }</DisplayString>
<DisplayString Condition = "format.exponent >= 15">{ (1 << (format.exponent-15)) * (-2*format.sign+1.0f) * (1.0f + format.significand/1024.0f) }</DisplayString>
</Type>
</AutoVisualizer>