Foundation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Foundation::Core::JobPool Struct Reference

Public Member Functions

 JobPool (Allocator *alloc, size_t maxJobs)
 
 ~JobPool ()
 
void Attach (JobSystem *system)
 
JobSystemAcquireOwner ()
 
void ReleaseOwner ()
 
void Detach ()
 
Pair< uint32_t, uint32_t > Allocate (StringView name, JobPriority priority, UniquePtr< JobCallable > callable, uint32_t dependencies)
 
bool Validate (uint32_t index, uint32_t generation) const noexcept
 
JobNodeGet (uint32_t index, uint32_t generation) noexcept
 
void AddRef (uint32_t index, uint32_t generation) noexcept
 
void Release (uint32_t index, uint32_t generation) noexcept
 
JobHandle AcquireActive (SharedPtr< JobPool > const &self, uint32_t index)
 

Public Attributes

Allocatorallocator
 
Span< JobNodenodes
 
Vector< uint32_t > freelist
 
Mutex mutex
 
Mutex ownerMutex
 
CondVar ownerCV
 
JobSystemowner {}
 
size_t ownerUsers {}
 
Atomic< size_t > liveBarriers {0}
 

Constructor & Destructor Documentation

◆ JobPool()

Foundation::Core::JobPool::JobPool ( Allocator alloc,
size_t  maxJobs 
)
inline

◆ ~JobPool()

Foundation::Core::JobPool::~JobPool ( )
inline

Member Function Documentation

◆ AcquireActive()

JobHandle Foundation::Core::JobPool::AcquireActive ( SharedPtr< JobPool > const &  self,
uint32_t  index 
)
inline

◆ AcquireOwner()

JobSystem * Foundation::Core::JobPool::AcquireOwner ( )
inline

◆ AddRef()

void Foundation::Core::JobPool::AddRef ( uint32_t  index,
uint32_t  generation 
)
inlinenoexcept

◆ Allocate()

Pair< uint32_t, uint32_t > Foundation::Core::JobPool::Allocate ( StringView  name,
JobPriority  priority,
UniquePtr< JobCallable callable,
uint32_t  dependencies 
)
inline

◆ Attach()

void Foundation::Core::JobPool::Attach ( JobSystem system)
inline

◆ Detach()

void Foundation::Core::JobPool::Detach ( )
inline

◆ Get()

JobNode * Foundation::Core::JobPool::Get ( uint32_t  index,
uint32_t  generation 
)
inlinenoexcept

◆ Release()

void Foundation::Core::JobPool::Release ( uint32_t  index,
uint32_t  generation 
)
inlinenoexcept

◆ ReleaseOwner()

void Foundation::Core::JobPool::ReleaseOwner ( )
inline

◆ Validate()

bool Foundation::Core::JobPool::Validate ( uint32_t  index,
uint32_t  generation 
) const
inlinenoexcept

Member Data Documentation

◆ allocator

Allocator* Foundation::Core::JobPool::allocator

◆ freelist

Vector<uint32_t> Foundation::Core::JobPool::freelist

◆ liveBarriers

Atomic<size_t> Foundation::Core::JobPool::liveBarriers {0}

◆ mutex

Mutex Foundation::Core::JobPool::mutex

◆ nodes

Span<JobNode> Foundation::Core::JobPool::nodes

◆ owner

JobSystem* Foundation::Core::JobPool::owner {}

◆ ownerCV

CondVar Foundation::Core::JobPool::ownerCV

◆ ownerMutex

Mutex Foundation::Core::JobPool::ownerMutex

◆ ownerUsers

size_t Foundation::Core::JobPool::ownerUsers {}

The documentation for this struct was generated from the following file: