carb::tasking::TaskingDesc

Defined in carb/tasking/TaskingTypes.h

struct TaskingDesc

Defines a tasking plugin descriptor.

Public Members

uint32_t fiberCount

The size of the fiber pool, limited to kMaxFibers.

Every task must be assigned a fiber before it can execute. A fiber is like a thread stack, but carb.tasking can choose when the fibers run, as opposed to threads where the OS schedules them.

A value of 0 means to use kMaxFibers.

uint32_t threadCount

The number of worker threads.

A value of 0 means to use carb::thread::hardware_concurrency().

uint32_t *threadAffinity

The optional array of affinity values for every thread.

If set to nullptr, affinity is not set. Otherwise it must contain threadCount number of elements. Each affinity value is a CPU index in the range [0 - carb::thread::hardware_concurrency())

uint64_t stackSize

The stack size per fiber.

0 indicates to use the system default.