- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Is it possible to create and commit several different DFTI descriptor and re-use them later (the FFT of different sizes will be called many times, and creating the descriptor and free it for each call seems not efficient). In other words, can the descriptor be created/committed and then saved in some arrays?
Ссылка скопирована
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
yes, that's possible.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Thanks. It's good to know. I have the following section of code. My question is how to extend it to the cases with much more than 3 lengths? I tried to save the descriptor in an array, it compiles and does now run.
Use MKL_DFTI
integer ier, n, k
complex cx(1000)
type(DFTI_DESCRIPTOR), POINTER :: HD1, HD2, HD3, HDk
type(DFTI_DESCRIPTOR) HD(3)
ier=DftiCreateDescriptor(HD1,DFTI_SINGLE,DFTI_COMPLEX,1, 32)
ier=DftiCreateDescriptor(HD2,DFTI_SINGLE,DFTI_COMPLEX,1,132)
ier=DftiCreateDescriptor(HD3,DFTI_SINGLE,DFTI_COMPLEX,1,232)
ier=DftiCommitDescriptor(HD1)
ier=DftiCommitDescriptor(HD2)
ier=DftiCommitDescriptor(HD3)
HD(1) = HD1
HD(2) = HD2
HD(3) = HD3
do k = 1, 3
n = 32 + 100*(k-1)
! ignored : Fill cx(1) ... cx(n)
! The following does not work:
! HDk = HD(k)
! But this is OK
if(k.eq.1 ) HDk=HD1
if(k.eq.1 ) HDk=HD2
if(k.eq.1 ) HDk=HD3
ier = DftiComputeForward( HDk, cx )
end do
ier = DftiFreeDescriptor(HD1)
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Error correction: The pointer assignments (in the above) are
if(k.eq.1 ) HDk=>HD1
if(k.eq.2 ) HDk=>HD2
if(k.eq.3 ) HDk=>HD3
Are there any way to avoid writing the "if( ... ) ..." statement many times (e.g., ~ 20)?
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати