Skip to content

optimize_fft_speedOptimizeFftSpeedOptimizeFftSpeedoptimize_fft_speedoptimize_fft_speed🔗

Short description🔗

optimize_fft_speedOptimizeFftSpeedOptimizeFftSpeedoptimize_fft_speedoptimize_fft_speed — Optimize the runtime of the FFT.

Signature🔗

optimize_fft_speed( integer Width, integer Height, string Mode )void OptimizeFftSpeed( const HTuple& Width, const HTuple& Height, const HTuple& Mode )static void HOperatorSet.OptimizeFftSpeed( HTuple width, HTuple height, HTuple mode )def optimize_fft_speed( width: int, height: int, mode: str ) -> None

Herror optimize_fft_speed( const Hlong Width, const Hlong Height, const char* Mode )

Herror T_optimize_fft_speed( const Htuple Width, const Htuple Height, const Htuple Mode )

static void HMisc::OptimizeFftSpeed( Hlong Width, Hlong Height, const HString& Mode )

static void HMisc::OptimizeFftSpeed( Hlong Width, Hlong Height, const char* Mode )

static void HMisc::OptimizeFftSpeed( Hlong Width, Hlong Height, const wchar_t* Mode ) (Windows only)

static void HMisc.OptimizeFftSpeed( int width, int height, string mode )

Description🔗

optimize_fft_speedOptimizeFftSpeed determines a method that achieves an optimum runtime of the FFT for an image of size Widthwidthwidth x Heightheightheight. The data that are determined for one image size do not influence the methods used for other image sizes. Consequently, optimize_fft_speedOptimizeFftSpeed can be called multiple times with different values for Widthwidthwidth and Heightheightheight to achieve an optimum runtime for all image sizes that are used in an application. The parameter Modemodemode determines the thoroughness of the search for the fastest method. For Modemodemode \(=\) 'standard'"standard" a fast search is used, which typically takes a few seconds. The method thus determined results in very good runtimes, which are not always optimal. For Modemodemode \(=\) 'patient'"patient" a more thorough search is performed, which typically takes several seconds and in most cases leads to optimum runtimes. For Modemodemode \(=\) 'exhaustive'"exhaustive" an exhaustive search is performed, which typically takes several minutes and always results in the optimum runtime. In most applications, Modemodemode \(=\) 'standard'"standard" results in the best compromise between the runtime of the FFT and the time required for the search of the optimum runtime. The data determined with optimize_fft_speedOptimizeFftSpeed can be saved with write_fft_optimization_dataWriteFftOptimizationData and can be loaded with read_fft_optimization_dataReadFftOptimizationData.

Please note that this optimization is performed for the particular computer on which the operator is called. The results are not suited to be transferred and used on other computers unless they have the same hardware and software configuration including the driver versions.

optimize_fft_speedOptimizeFftSpeed influences the runtime of the following operators, which use the FFT: fft_genericFftGeneric, fft_imageFftImage, fft_image_invFftImageInv, photometric_stereoPhotometricStereo, sfs_pentlandSfsPentland, sfs_mod_lrSfsModLr, sfs_orig_lrSfsOrigLr wiener_filterWienerFilter.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Widthwidthwidth (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of the image for which the runtime should be optimized.

Default: 512512
Suggested values: 128, 160, 192, 256, 320, 384, 512, 640, 768, 1024, 2048128, 160, 192, 256, 320, 384, 512, 640, 768, 1024, 2048

Heightheightheight (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of the image for which the runtime should be optimized.

Default: 512512
Suggested values: 120, 128, 144, 240, 256, 288, 480, 512, 576, 1024, 2048120, 128, 144, 240, 256, 288, 480, 512, 576, 1024, 2048

Modemodemode (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Thoroughness of the search for the optimum runtime.

Default: 'standard'"standard"
List of values: 'exhaustive', 'patient', 'standard'"exhaustive", "patient", "standard"

Result🔗

optimize_fft_speedOptimizeFftSpeed returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible successors

fft_genericFftGeneric, fft_imageFftImage, fft_image_invFftImageInv, wiener_filterWienerFilter, wiener_filter_niWienerFilterNi, photometric_stereoPhotometricStereo, sfs_pentlandSfsPentland, sfs_mod_lrSfsModLr, sfs_orig_lrSfsOrigLr, write_fft_optimization_dataWriteFftOptimizationData

Alternatives

read_fft_optimization_dataReadFftOptimizationData

See also

optimize_rft_speedOptimizeRftSpeed

Module🔗

Foundation