c++ - AVX convert 64 bit integer to 64 bit float -


i convert 4 packed 64 bit integers 4 packed 64 bit floats using avx. i've tried like:

int_64t *ls = (int64_t *) _mm_malloc(256, 32); ls[0] = a; //... ls[3] = d;  __mm256i packed = _mm256_load_si256((__m256i const *)ls); 

which display in debugger:

(gdb) print packed $4 = {1234, 5678, 9012, 3456} 

okay far, cast/conversion operation can find _mm256i_castsi256_pd, doesn't me want:

__m256d pd = _mm256_castsi256_pd(packed);  (gdb) print pd $5 = {6.0967700696809824e-321, 2.8053047370865979e-320, 4.4525196003213139e-320, 1.7074908720273481e-320} 

what i'd see is:

(gdb) print pd $5 = {1234.0, 5678.0, 9012.0, 3456.0} 

all of cast intrinsics perform bitwise cast, why you're not seeing meaningful results that.

a vector conversion (the cvt intrinsics) between 64-bit integer , 64-bit float not exist.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -