Blender V5.0
blender::fftw Namespace Reference

Functions

int optimal_size_for_real_transform (int size)
int2 optimal_size_for_real_transform (int2 size)
void initialize_float ()
static bool is_humble_number (int n)
static int find_next_even_humble_number (int n)
static void tbb_parallel_loop_for_fftw (void *(*work)(char *), char *job_data, size_t element_size, int number_of_jobs, void *)

Function Documentation

◆ find_next_even_humble_number()

int blender::fftw::find_next_even_humble_number ( int n)
static

Definition at line 43 of file fftw.cc.

References is_humble_number().

Referenced by optimal_size_for_real_transform().

◆ initialize_float()

void blender::fftw::initialize_float ( )

Initialize the float variant of FFTW. This essentially setup the multi-threading hooks to enable multi-threading using TBB's parallel_for and makes the FFTW planner thread safe.

Definition at line 88 of file fftw.cc.

References BLI_system_thread_count(), and tbb_parallel_loop_for_fftw().

Referenced by main().

◆ is_humble_number()

bool blender::fftw::is_humble_number ( int n)
static

Definition at line 22 of file fftw.cc.

References is_humble_number().

Referenced by find_next_even_humble_number(), and is_humble_number().

◆ optimal_size_for_real_transform() [1/2]

int blender::fftw::optimal_size_for_real_transform ( int size)

FFTW's real to complex and complex to real transforms are more efficient when their input has a specific size. This function finds the most optimal size that is more than or equal the given size. The input data can then be zero padded to the optimal size for better performance. See Section 4.3.3 Real-data DFTs in the FFTW manual for more information.

Definition at line 59 of file fftw.cc.

References find_next_even_humble_number(), and size().

Referenced by blender::compositor::convolve(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_fog_glow(), and optimal_size_for_real_transform().

◆ optimal_size_for_real_transform() [2/2]

int2 blender::fftw::optimal_size_for_real_transform ( int2 size)

Definition at line 69 of file fftw.cc.

References optimal_size_for_real_transform(), and size().

◆ tbb_parallel_loop_for_fftw()

void blender::fftw::tbb_parallel_loop_for_fftw ( void *(* work )(char *),
char * job_data,
size_t element_size,
int number_of_jobs,
void *  )
static

Definition at line 75 of file fftw.cc.

References i, and blender::threading::parallel_for().

Referenced by initialize_float().