Visual Studio#39;s #39;watch#39; incorrectly shows zero for half of the numbers in a Vectorlt;floatgt;(Visual Studio手表在向量浮点中有一半的数字错误地显示为零(lt;s39;Watch#39;s39;s39;Watch#39;s;Watch#39;))
问题描述
这是VS 2017手表中的一个错误,还是我做了什么蠢事?它不会显示Vector的一半内容。(在我的系统上,Vector.Count为8)。
[Test]
public void inspectVector()
{
var numbers = new float[] { 1, 2, 3, 4, 5, 6, 7, 8 };
var inputVector = new Vector<float>(numbers);
var five = inputVector[4]; //this is fine - 5
float[] numbersCopiedBack = new float[8];
inputVector.CopyTo(numbersCopiedBack); //this is fine - 1, 2, 3, 4, 5, 6, 7, 8
}
这似乎很奇怪。为什么对inputVector的监视没有显示一半的数字,即使在其他方面看起来行为正确呢?该问题也存在于监视窗口中-但是,ToString()正确显示<1, 2, 3, 4, 5, 6, 7, 8>
我运行的是Microsoft Visual Studio专业版2017,
版本15.4.215.7.5,并使用System.Numerics.Vectors版本4.5.0。我尝试过调试和发布;我在关闭优化的情况下运行(AFAIK在这种情况下,您实际上不会得到SIMD优化;但在这里,我只想调试一个算法)。
推荐答案
显然,这实际上是一个已知问题-"调试器在没有后备字段的情况下无法正确处理字节。"-https://github.com/dotnet/coreclr/issues/16280。
这篇关于Visual Studio手表在向量浮点中有一半的数字错误地显示为零(<;s&39;Watch';s&39;s&39;Watch';s;Watch';)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Visual Studio手表在向量浮点中有一半的数字错误地显示为零(<;s&39;Watch';s&39;s&39;Watch';s;Watch';)


- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 如何用自己压缩一个 IEnumerable 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 输入按键事件处理程序 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01