【发布时间】:2017-07-09 23:06:34
【问题描述】:
当使用 v141 在当前版本的 Eigen 中编译文件“ProductEvaluators.h”中的函数时,出现内部编译器错误。
fatal error C1001: An internal error has occurred in the compiler.
函数如下所示,我将编译器的错误/崩溃缩小到最后一行的'.sum()':
EIGEN_DEVICE_FUNC const CoeffReturnType coeff(Index index) const
{
const Index row = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? 0 : index;
const Index col = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? index : 0;
return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum();
}
虽然修复这个特定错误当然会很有趣,但我也想知道,什么样的代码通常会引发这种编译器崩溃?
【问题讨论】:
-
在没有优化的情况下也会发生吗?如果是,请将编译器错误报告给 Microsoft。
-
仅供参考,如果尝试编译 Ceres 会发生这种情况,使其现在无法与 v141 一起使用。
标签: c++ visual-c++ visual-studio-2017 eigen