-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cdcMultiCore breaking with high number of CPU cores
- Loading branch information
1 parent
9526daf
commit 213df3a
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "Multicore.h" | ||
|
||
#include "Hook.h" | ||
#include "modules/Log.h" | ||
|
||
bool(*cdc::JobChainImplWithThreads::s_StartSystem)(int); | ||
|
||
bool cdc::JobChainImplWithThreads::StartSystem(int numThreads) | ||
{ | ||
if (numThreads > 32) | ||
{ | ||
numThreads = 32; | ||
} | ||
|
||
Hook::GetInstance().GetModule<Log>()->WriteLine("cdc::JobChainImplWithThreads::StartSystem(%d)", numThreads); | ||
|
||
return s_StartSystem(numThreads); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
|
||
namespace cdc | ||
{ | ||
class JobChainImplWithThreads | ||
{ | ||
public: | ||
static bool(*s_StartSystem)(int); | ||
|
||
static bool StartSystem(int numThreads); | ||
}; | ||
} |