2 ms·
Is this GPT-generated crap? It is wrong and useless, like GPT always is, but sounds intelligent to fool the ignorant. The compiler can inline functions, but i
by celrod 3y ago
Is this GPT-generated crap?
It is wrong and useless, like GPT always is, but sounds intelligent to fool the ignorant.
The compiler can inline functions, but it is essential for it to do so. It does not adjust heuristics based on being in a loop.
Hence, manual intervention like `@inline` is often needed for non-trivial cases, such as `exp`.
`@simd` doesn't say vectotization is desired, which implies changing heuristics.
It adds flags to reduction variables to say it is legal to reassociate them.
That does not help at all with indirect indexing.
`@simd ivdep` does help by communicating it is legal to perform the loop iterations in parallel, meaning the legality checks are no longer required.
The functions must still be inlined for it to succeed in generating vectorized code.
- oersted 3y agoYes, my bad. This is a bit far from my expertise, so I was trying out MirrorThink to understand what was being discussed. This reply seemed constructive so I copied it over, clearly I should have verified it better.