arduano / simdeez

easy simd
MIT License
332 stars 25 forks source link

Looking for _mm256_broadcastq_epi64 #39

Closed jhorstmann closed 4 years ago

jhorstmann commented 4 years ago

First time using simdeez, I'm trying to translate some code from C which uses the _mm256_broadcastq_epi64 intrinsic and cannot find the corresponding function in simdeez::avx2::Avx2. Is this simply missing an implementation or is the reason that this instruction cannot be abstracted over different instruction sets?

jackmott commented 4 years ago

Probably just missing, if you want to give a try adding it please feel free.

jhorstmann commented 4 years ago

Started looking into it some more and I'm having a difficult time matching this intrinsic to the simdeez model. The instruction is documented to take an __m128i argument, but uses only the lower half of it, duplicating that into all lanes. Writing it like that seems to be difficult since there is no I64x2 type in the scalar implementation.

But I also noticed that for my usecase, set1_epi64 is actually already doing what I need, so I'm going to close this for now.