arduano / simdeez

easy simd
MIT License
337 stars 25 forks source link

make the simd_runtime_generate macro explicitly unsafe #52

Closed verpeteren closed 2 weeks ago

verpeteren commented 1 year ago

As discussed in this issue it would be better that the simd_xxx_generate macros are explictly unsafe.

This has an impact for consumers of this crate, so a (minor) version bump might be applicable.

arduano commented 1 year ago

What makes those generated functions explicitly unsafe? Isn't it only the fact that the cpu might not have those instructions?

If so, then isn't the runtime generate function completely safe, because it ensures at runtime that the instructions that it will use do exist?

verpeteren commented 2 weeks ago

Ok, lets' close this PR and this issue then.