更新4的MSVC 2013 Ultimate
不明白为什么我在这个看似简单的例子中得到这个错误
info C5002:由于'1200'原因,循环未向量化
是的
1200循环包含循环携带的数据依赖性
我没有看到循环的迭代如何相互干扰.
__declspec( align( 16 ) ) class PhysicsSystem
{
public:
static const int32_t MaxEntities = 65535;
__declspec( align( 16 ) ) struct VectorizedXYZ
{
double mX[ MaxEntities ];
double mY[ MaxEntities ];
double mZ[ MaxEntities ];
VectorizedXYZ()
{
memset( mX, 0, sizeof( mX ) );
memset( mY, 0, sizeof( mY ) );
memset( mZ, 0, sizeof( mZ ) );
}
};
void Update( double dt )
{
for ( int32_t i = …Run Code Online (Sandbox Code Playgroud)