c - Loading a pair of floats into a vector type as though it were a double -


i wish broadcast load __m256 vector same 4 pairs of floats adjacent in memory.

that is, if have pointer float array x given {a, b}, wish end __mm256 containing {a, b, a, b, a, b, a, b}.

my question is, there potential problems using _mm256_broadcast_sd achieve after casting x double array?

so:

__m256 vect = (__m256)_mm256_broadcast_sd((double *)x); 

yes, can safely; have done in past. in case, doing math using complex numbers each component held using float. using mm256_broadcast_sd() can used insert single complex number each of 4 positions in resulting __m256d instance, can cast __m256 if want float operations on it.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -