HPC_Voxel_Engine 0.2.0
High-Performance C++ Voxel Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ThermalSystem Class Reference

Manages a thread pool to compute 3D explicit thermal diffusion across voxel chunks. More...

#include <src/physics/ThermalSystem.h>

Collaboration diagram for ThermalSystem:
Collaboration graph

Public Member Functions

 ThermalSystem (int iNumThreads)
 
 ~ThermalSystem ()
 
void UpdateTemperature (float fDeltaTime, ChunkManager &objChunkManager)
 Wakes worker threads to compute the next thermal integration step based on elapsed time.
 
void SetEnableSIMD (bool bEnable)
 

Private Member Functions

void workerThreadLoop (int iThreadID)
 Main execution loop for each worker thread, regulated by barrier synchronization.
 

Private Attributes

int m_iNumThreads
 
std::atomic< bool > m_bIsRunning
 
std::atomic< bool > m_bIsSIMDEnabled
 
float m_fCurrDeltaTime
 
ChunkManagerm_pCurrChunkManager
 
std::unique_ptr< std::barrier<> > m_pStartBarrier
 
std::unique_ptr< std::barrier<> > m_pPhase1Barrier
 
std::unique_ptr< std::barrier<> > m_pPhase2Barrier
 
std::vector< std::thread > m_vecWorkerThreads
 

Detailed Description

Manages a thread pool to compute 3D explicit thermal diffusion across voxel chunks.

Constructor & Destructor Documentation

◆ ThermalSystem()

ThermalSystem::ThermalSystem ( int  iNumThreads)
Here is the call graph for this function:

◆ ~ThermalSystem()

ThermalSystem::~ThermalSystem ( )

Member Function Documentation

◆ SetEnableSIMD()

void ThermalSystem::SetEnableSIMD ( bool  bEnable)
inline

◆ UpdateTemperature()

void ThermalSystem::UpdateTemperature ( float  fDeltaTime,
ChunkManager objChunkManager 
)

Wakes worker threads to compute the next thermal integration step based on elapsed time.

◆ workerThreadLoop()

void ThermalSystem::workerThreadLoop ( int  iThreadID)
private

Main execution loop for each worker thread, regulated by barrier synchronization.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_bIsRunning

std::atomic<bool> ThermalSystem::m_bIsRunning
private

◆ m_bIsSIMDEnabled

std::atomic<bool> ThermalSystem::m_bIsSIMDEnabled
private

◆ m_fCurrDeltaTime

float ThermalSystem::m_fCurrDeltaTime
private

◆ m_iNumThreads

int ThermalSystem::m_iNumThreads
private

◆ m_pCurrChunkManager

ChunkManager* ThermalSystem::m_pCurrChunkManager
private

◆ m_pPhase1Barrier

std::unique_ptr<std::barrier<> > ThermalSystem::m_pPhase1Barrier
private

◆ m_pPhase2Barrier

std::unique_ptr<std::barrier<> > ThermalSystem::m_pPhase2Barrier
private

◆ m_pStartBarrier

std::unique_ptr<std::barrier<> > ThermalSystem::m_pStartBarrier
private

◆ m_vecWorkerThreads

std::vector<std::thread> ThermalSystem::m_vecWorkerThreads
private

The documentation for this class was generated from the following files: