cuda - On plans reuse in cuFFT -


this may seem simple question cufft usage not clear me.

my question is: which 1 of following implementations correct?

1)

// called in loop cufftplan3d (plan1, x, y, z) ; cufftexec (plan1, data1) ; cufftexec (plan1, data2) ; cufftexec (plan1, data3) ; destroyplan(plan1)     

2)

init() //called 1 time in application {     cufftplan3d (plan1, x, y, z) ; } exec () //called many times data changing size remains same {     cufftexec (plan1, data1) ;     cufftexec (plan1, data2) ;     cufftexec (plan1, data3) ; }  deinit() //called 1 time in application {         destroyplan(plan1)     } 

3)

 cufftplan3d (plan1, x, y, z) ;  cufftexec (plan1, data1) ;  destroyplan(plan1)    cufftplan3d (plan2, x, y, z) ;  cufftexec (plan2, data2) ;  destroyplan(plan2)    ....   ... 

assume data sizes of data1, data2 , data3 same. please ignore correctness of syntax. need conceptual answer.

the third implementation doesn't correct me...

i think 3 can made work. method 2 fastest, long plan fits data each of data1, data2, , data3.

you can reuse plan many times want, long transform intent doesn't change.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -