thenoob94 Posted May 24, 2023 Report Share Posted May 24, 2023 I'm trying to use the labview FFT however it's extremely slow compared to FFTW... I have wrapped the fftw in lv however it's rather inconsistent with regards to the time it takes to calculate. In plain c it's not inconsistent at all so I suppose the issue has something to do with the way the memory is allocated when I use it in lv. Any ideas how to solve this? Quote Link to comment
GregSands Posted May 24, 2023 Report Share Posted May 24, 2023 I would recommend trying the NI Multicore Analysis and Sparse Matrix Toolkit. The FFT included there seems robust and much faster than the native LabVIEW FFT. It also supports single precision (which is faster again, and usually sufficient) and 3D FFTs as well. All of the MASM VIs are useful replacements for the single-threaded defaults, and I think it is based on the Intel Math Kernel Library. I think I tried FFTW at one stage - in fact I just found a post I made in 2013 which has links to a FFTW wrapper - I'd forgotten about that! Also at the end of the page is a link to a 32/64 bit version. But I'd still try the MASM toolkit. 1 Quote Link to comment
X___ Posted May 30, 2023 Report Share Posted May 30, 2023 On 5/24/2023 at 2:13 PM, GregSands said: I would recommend trying the NI Multicore Analysis and Sparse Matrix Toolkit. The FFT included there seems robust and much faster than the native LabVIEW FFT. It also supports single precision (which is faster again, and usually sufficient) and 3D FFTs as well. All of the MASM VIs are useful replacements for the single-threaded defaults, and I think it is based on the Intel Math Kernel Library. I think I tried FFTW at one stage - in fact I just found a post I made in 2013 which has links to a FFTW wrapper - I'd forgotten about that! Also at the end of the page is a link to a 32/64 bit version. But I'd still try the MASM toolkit. Interesting suggestion. Any idea how the multicore option works (Get/Set Number of Threads)? When I test this on a standalone VI, I get a number of 8 for "Transform" (which is what I am interested in testing) or "Linear Algebra" (I am using a 8 cores/16 threads laptop). When I include this as part of a larger project (launching a number of parallel tasks some of which use parallel loops), I end up with a "1" (in both tasks). I am not sure I should necessarily expect multithreading to be particularly useful in my case (rather small array sizes) but there isn't any explanation that I know of as to how this is supposed to work or be understood... 1 Quote Link to comment
GregSands Posted May 31, 2023 Report Share Posted May 31, 2023 Aside from what is in the Help, I don't know how the Threads option works. From what I can tell, it does not seem to have much (any?) effect inside a parallel loop. I tend to use it for large 3D arrays, so it makes a substantial difference. 1 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.