Is there a switch for circular/periodic convolutions?

78 views
Skip to first unread message

James Rowland

unread,
May 31, 2017, 8:24:04 PM5/31/17
to ArrayFire Users
In physics simulations it is common to use periodic boundary conditions for solving differential equations. To implement numerical solutions I need a periodic convolution. My convolution kernel is small so I do not want to use FFT. Is there a way to make convolve perform a periodic convolution?

Best,
James Rowland IV

ArrayFire v3.4.2 - C++
Visual Studio 15
Windows 10
i5-3570K + 8GB RAM + GTX780 CUDA 8.0

Pradeep Garigipati

unread,
Jun 4, 2017, 11:40:05 PM6/4/17
to James Rowland, ArrayFire Users
Hi James,

As of now, there is no parameter that helps you switch between linear and circular convolutions in the convolve* functions. From what I understand of Circular Convolutions, it appears we can implement Linear Convolution using Circular Convolution but not the other way around - from functional level at least i.e. using existing convolve* functions from ArrayFire.

Please feel free to open a feature request on github and we will look into. We also welcome community contributions. You can also reach us on gitter.

Regards,
Pradeep.

--
You received this message because you are subscribed to the Google Groups "ArrayFire Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arrayfire-use...@googlegroups.com.
To post to this group, send email to arrayfi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/arrayfire-users/82862975-89e1-427b-8f0c-5484278dcdf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Rowland

unread,
Jun 5, 2017, 8:12:11 AM6/5/17
to ArrayFire Users
For other users encountering this problem I found a stopgap solution with the shift function in arrayfire. For simple nearest neighbor kernels shift is acceptable.

romain dupont

unread,
Aug 22, 2017, 7:57:16 AM8/22/17
to ArrayFire Users

Hi,

I am interested in such solution!! I am using ArrayFire.jl and somehow

shift(real(ifft(Jf.*fft(V))),-div(N,2),-div(N,2),0,0)

did not give me satisfaction.

Thank you

Best regards
Reply all
Reply to author
Forward
0 new messages