Closed felixdollack closed 1 year ago
Thanks! Did not encountered this issue on my Intel Macbook.
Hi, a question to that. For the WIN-version it's clear we need _aligned_free, but where is the (non-windows version) "aligned_free" coming from? It doesn't seem to be C++ -standard, "free" is supposed to work for non-windows architectures.
Also, imho, we need an aligned mother wavelet (Morlet::mother) since it's used in conjunction with _mm256_set_ps which requires aligned arguments. And because of that also a similar "aligned free" in the destructor (_aligend_free for Windows, and otherwise free)
I simply mirrored this part: https://github.com/fastlib/fCWT/blob/e6e6c15303a4ade9a882bcd2cf2190d4f738bda0/src/fcwt/fcwt.cpp#L432-L439 I did not actually test it on macOS, since cmake is unable to find open_mp after the upgrade of fCWT to 2.0.
Free fCWT input after plan has been executed and use aligned_free for IHat and O1. This fixes the segfault (mentioned in #8) and avoids corrupted heap memory.