例如,我有两个数组a1和a2。为了计算它们之间的卷积 ,我需要计算它们的FFT,它应该是存储在两个临时数组中的。然后这些数组将乘以和FFT返回,这也需要一个临时数组。完全有 三个临时数组。 似乎表达式模板不会减少 临时数组的数量。有没有更好的方法来减少临时工作? 谢谢, 彭Hi,Expression template can be used for the implementation of simpleoperators without using temporaries (e.g. the ones in the book C++Template).I''m wondering whether expression template is useful for theconvolution operation.For example, I have two arrays a1 and a2. To compute the convolutionbetween them I need to compute the FFT of both of them, which shall bestored in two temporary arrays. These arrays then shall be multipliedand FFT back, which also need a temporary arrays. There are totallythree temporary arrays.It seems that expression template would not reduce the number oftemporary arrays. Are there any better way to reduce the temporaries?Thanks,Peng推荐答案 10月19日,7:49 * pm,Peng Yu< PengYu ... @ gmail.comwrote:On Oct 19, 7:49*pm, Peng Yu <[email protected]: 表达式模板可用于实现简单的 运算符而不使用临时值(例如书中的那些C ++ 模板)。 /> 我想知道表达式模板是否对 卷积操作有用。 例如,我有两个数组a1和a2。为了计算它们之间的卷积 ,我需要计算它们的FFT,它应该是存储在两个临时数组中的。然后这些数组将乘以和FFT返回,这也需要一个临时数组。完全有 三个临时数组。 似乎表达式模板不会减少 临时数组的数量。有没有更好的方法来减少临时工资? 谢谢, 彭Hi,Expression template can be used for the implementation of simpleoperators without using temporaries (e.g. the ones in the book C++Template).I''m wondering whether expression template is useful for theconvolution operation.For example, I have two arrays a1 and a2. To compute the convolutionbetween them I need to compute the FFT of both of them, which shall bestored in two temporary arrays. These arrays then shall be multipliedand FFT back, which also need a temporary arrays. There are totallythree temporary arrays.It seems that expression template would not reduce the number oftemporary arrays. Are there any better way to reduce the temporaries?Thanks,Peng 如果你想减少临时工,尝试阅读Alexandrescu'的mojo 代码。表达式模板太高级,无法满足您的需求, 因此可能无需花时间编码。希望它有所帮助, aaIf you want to reduce temporaries, try to read Alexandrescu''s mojocode. Expression templates are too advanced for what you need to do,so it may not pay the time in coding it. Hope it helps,aa On 20 Okt。,05:53,aaragon< alejandro.ara ... @ gmail.comwrote:On 20 Okt., 05:53, aaragon <[email protected]: > 如果你想减少临时工作,请尝试阅读Alexandrescu'的魔力 代码。表达式模板太高级,无法满足您的需求, 因此可能无需花时间编码。希望它有所帮助, aa>If you want to reduce temporaries, try to read Alexandrescu''s mojocode. Expression templates are too advanced for what you need to do,so it may not pay the time in coding it. Hope it helps,aa 嗯,我不知道术语mojo。只需对它进行搜索加工,然后找到: - http://www.ddj.com/database/184403855 我会看看这个。感谢您的提示。 - MaikHm, I didn''t know the term "mojo". Just search-machined for it andfound:- http://www.ddj.com/database/184403855I''ll have a look into this. Thanks for hint.-- Maik 10月20日,5:01 * am,Maik< Beckmann.M ... @ googlemail.comwrote:On Oct 20, 5:01*am, Maik <[email protected]: On 20 Okt。,05:53,aaragon< alejandro.ara ... @ gmail.comwrote:On 20 Okt., 05:53, aaragon <[email protected]: 如果你想减少临时值,请尝试阅读Alexandrescu'的mojo 代码。表达式模板太高级,无法满足您的需求, 因此可能无需花时间编码。希望它有所帮助, If you want to reduce temporaries, try to read Alexandrescu''s mojo code. Expression templates are too advanced for what you need to do, so it may not pay the time in coding it. Hope it helps, aa aa 嗯,我不知道术语mojo。 *只需对其进行搜索加工,然后找到: * -http://www.ddj.com/database/184403855 I我会看看这个。感谢提示。 - MaikHm, I didn''t know the term "mojo". *Just search-machined for it andfound:*-http://www.ddj.com/database/184403855I''ll have a look into this. Thanks for hint.-- Maik 在了解它的工作原理后,这很容易实现。好的 运气, aaThat is very easy to implement after you understand how it works. Goodluck,aa 这篇关于表达模板和FFT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-21 12:36