MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ calculate_workgroups()

uint32_t MayaFlux::Core::VKComputePipeline::calculate_workgroups ( uint32_t  element_count,
uint32_t  workgroup_size 
)
staticprivate

Calculate number of workgroups needed.

Parameters
element_countTotal elements to process
workgroup_sizeElements per workgroup
Returns
Number of workgroups (rounded up)

Definition at line 346 of file VKComputePipeline.cpp.

347{
348 if (workgroup_size == 0) {
349 return 0;
350 }
351
352 return (element_count + workgroup_size - 1) / workgroup_size;
353}

Referenced by calculate_dispatch_1d(), calculate_dispatch_2d(), calculate_dispatch_3d(), dispatch_1d(), dispatch_2d(), and dispatch_3d().

+ Here is the caller graph for this function: