索拉 2024 年 4 月 2 日 5:17
我也非常讨厌它,并打算在 GH 上提出问题。
它打破了参数和形参之间良好的对称性。
如果强制执行此样式,则将参数更改为参数意味着重命名函数体中的所有内容
使带有重载的函数看起来vectorize特别糟糕:
vectorize[func, simd_width, unroll](size)
vectorize[func, simd_width, unroll, size]()
# vs
vectorize[Func, SimdWidth, Unroll](size)
vectorize[Func, SimdWidth, Unroll, Size]() # why the sudden `Size`?
``
与值别名的指南不一致,因为参数就像本地别名
看起来很可怕