You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The uint64_t member of this union requires 8 bytes alignment. Actually, this member is unused, so it would be best to remove it, and make the default 4 byte alignment work. Why doesn't this library use the C99 complex type feature?
I've also noticed that 16 byte alignment was added to a lot of the example apps with the support for ESP32S3 chip in 108493c. Is this alignment only required for implementations using assembly code for that chip?
The tests disable alignment on esp-idf version <4.3.0 by defining memalign as malloc and ignoring the alignment parameter. Would this not cause issues when loading memory from an unaligned address?
The text was updated successfully, but these errors were encountered:
The tests disable alignment on esp-idf version <4.3.0 by defining memalign as malloc and ignoring the alignment parameter.
I think the reason is that older versions of IDF didn't have memalign implemented. And the 16 byte alignment is necessary for esp32-s3, which is supported only since IDF 4.4.
Good point about documenting the alignment requirements, we'll update the docs!
tom-borcin
changed the title
Memory alignment issues
Memory alignment issues
Apr 3, 2023
github-actionsbot
changed the title
Memory alignment issues
Memory alignment issues (DSP-80)
Apr 3, 2023
There are some places in this library where the user must align memory passed to functions correctly. These are not documented anywhere I can find.
E.G. The
dsps_fft4r_fc32_ansi_
function casts thefloat *data
parameter to the following struct:The uint64_t member of this union requires 8 bytes alignment. Actually, this member is unused, so it would be best to remove it, and make the default 4 byte alignment work. Why doesn't this library use the C99 complex type feature?
I've also noticed that 16 byte alignment was added to a lot of the example apps with the support for ESP32S3 chip in 108493c. Is this alignment only required for implementations using assembly code for that chip?
esp-dsp/modules/common/include/dsp_tests.h
Line 34 in 3175e82
The tests disable alignment on esp-idf version <4.3.0 by defining
memalign
asmalloc
and ignoring the alignment parameter. Would this not cause issues when loading memory from an unaligned address?The text was updated successfully, but these errors were encountered: