Gamification
Gamification

Reputation: 827

FFTW3: Query the SIMD-alignment

According to the docs SIMD alignment and fftw_malloc

the arrays of complex (or real) data passed to FFTW must be specially aligned in memory (typically 16-byte aligned)[...]

In order to guarantee proper alignment for SIMD [...] we recommend allocating your transform data with fftw_malloc and de-allocating it with fftw_free.

Now when passing windows of a continous buffer into FFTW, how can I tell whether or not they'll be aligned? More specifically: If I use fftw_malloc to allocate a buffer for FFTW, at what offsets may I window this buffer to keep the alignment requirements?

It says the alignment is "typically" 16-byte but how can I tell for sure?

Upvotes: 1

Views: 135

Answers (0)

Related Questions