
Anonymous
Not applicable
07-12-2011
12:31 PM
245 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MKL has a cosine transform among its Trigonometric Transforms (Chapter 13 of the manual). The cosine transform is significantly faster than that of FFTW.
However, there is no documented way to apply cosine transform to strided data. In particular, suppose
a b a b a b a b a b a b ....
is a sequence of doubles. I want to apply a cosine transform to the a's and to the b's. Is there a way to do that?
However, there is no documented way to apply cosine transform to strided data. In particular, suppose
a b a b a b a b a b a b ....
is a sequence of doubles. I want to apply a cosine transform to the a's and to the b's. Is there a way to do that?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are calling from Fortran, you can use an array expression for the input argument.
In Fortran as well as C, you can, of course, extract the 'a's into one array, the 'b's into another and use such an array as the input argument.
You could put your data into a 2-D array:
a b
a b
a b
and pass each column to the FFT routine.
In Fortran as well as C, you can, of course, extract the 'a's into one array, the 'b's into another and use such an array as the input argument.
You could put your data into a 2-D array:
a b
a b
a b
and pass each column to the FFT routine.

Anonymous
Not applicable
07-12-2011
04:31 PM
245 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One can copy the interleaved data into two stride 1 arrays and use MKL, but that incurs a very significant penalty. If n=1024, copying will increase the cost of a single cosine transform (assuming data is not in cache but the copying area is in cache) by nearly 30%.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm glad I'm not the only one who is attempting to vectorize operations with interleaved data -- i.e. complex numbers.


Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page