dannys4 / FFT-Research-F20

Research into accelerated FFTs
MIT License
2 stars 1 forks source link

Unnecessary alignment with danger of memory leak #3

Closed mkstoyanov closed 3 years ago

mkstoyanov commented 3 years ago

https://github.com/dannys4/FFT-Research-F20/blob/a6a45f6c761b5d84122a1cb1261231d6df839328/FFTE/include/complex.hpp#L109

You don't need to use aligned memory here, you can always read/write to unalined memory and I/O doesn't have to be fast. Without alignment, you can also use RAII or stack memory, e.g.,

         double tmp[2];
        _mm_storeu_pd(tmp, dt.getVar());
dannys4 commented 3 years ago

This issue is now addressed in commit 018d7a92f3ce84094cf0840a397d6b6a151a8578