小编The*_*tor的帖子

为什么矢量化在这个 for 循环中没有好处?

我正在尝试将此 for 循环向量化。使用 Rpass 标志后,我收到以下评论:

int someOuterVariable = 0;

for (unsigned int i = 7; i != -1; i--)
{
  array[someOuterVariable + i] -= 0.3 * anotherArray[i];
}

Remark:
The cost-model indicates that vectorization is not beneficial
the cost-model indicates that interleaving is not beneficial
Run Code Online (Sandbox Code Playgroud)

我想了解这意味着什么。“交错不是有益的”是否意味着数组索引不正确?

c++ vectorization llvm clang auto-vectorization

6
推荐指数
1
解决办法
214
查看次数

标签 统计

auto-vectorization ×1

c++ ×1

clang ×1

llvm ×1

vectorization ×1