Defined in carb/Defines.h

CARB_DIVIDE_CEIL(size, divisor)

Divides size by divisor and returns the closest integer greater than or equal to the division result.

For uses such as calculating a number of thread groups that cover all threads in a compute dispatch.

  • size – An integer value.

  • divisor – The divisor value.


size / divisor, rounded up to the nearest whole integer. The type is based on size.