I don't know whether I use this function correctly. I just want to move a C++ program to Rust and I have no idea about the memory structure of Vec or is it similar as pointer in C++? I would try _mm256_mask_loadu_pd later.
It might already been technically wrong in the C++ code. It will typically not be a practical problem because allocations are typically more aligned than the actual requirement. Additionally, afaik some CPUs do not complain about unaligned loads with aligned instructions.
I don't know what you mean exactly by internal structure of Vec. The layout of Vec itself is unspecified but it consists of a pointer, a capacity and the length of initialized elements. In that regard it is the same as std::vector in C++.
Thank you very much! Vec data could be loaded to __m256d by function _mm256_loadu_pd. I guess that as a struct member with other primary type variable in a same memory block it might not be aligned.