Blender V4.3
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()

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

Definition at line 39 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 84 of file fftw.cc.

References BLI_system_thread_count(), and tbb_parallel_loop_for_fftw().

Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::execute_fog_glow(), blender::realtime_compositor::FogGlowKernel::FogGlowKernel(), and blender::compositor::GlareFogGlowOperation::generate_glare().

◆ is_humble_number()

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

Definition at line 18 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 55 of file fftw.cc.

References find_next_even_humble_number().

Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::execute_fog_glow(), blender::compositor::GlareFogGlowOperation::generate_glare(), 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 65 of file fftw.cc.

References optimal_size_for_real_transform().

◆ tbb_parallel_loop_for_fftw()

static 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 71 of file fftw.cc.

References blender::threading::parallel_for().

Referenced by initialize_float().