ComputeContext.kl¶
Types¶
LogTraceIndentBracket (struct)¶
A simple helper for bracketing RTRScheduler debug trace indentation.
Members¶
Ref<ComputeContext> | computeContext | |
UInt32 | threadIndex | |
UInt32 | depthBackup |
Methods¶
LogTraceIndentBracket ( in LogTraceIndentBracket other ) | |
LogTraceIndentBracket () | |
LogTraceIndentBracket | clone ? () |
MultithreadAdvisorBracket (struct)¶
Members¶
Ref<MultithreadAdvisor> | mtAdvisor | |
UInt64 | startTick | |
UInt32 | threadId |
Methods¶
MultithreadAdvisorBracket ( in MultithreadAdvisorBracket other ) | |
MultithreadAdvisorBracket ( io MultithreadAdvisor mtAdvisor, in UInt32 range, io UInt32 batchCount ) | |
MultithreadAdvisorBracket () | |
MultithreadAdvisorBracket | clone ? () |
~MultithreadAdvisorBracket () |
MultithreadAdvisorBatchBracket (struct)¶
Members¶
UInt32 | threadId | |
UInt64 | startTick | |
Float64 | startActiveWaitTime | |
Boolean | multithreading | |
:ref:`MultithreadAdvisor_perThreadData <multithreadadvisor_perthreaddata>`<> | perThreadData | |
:ref:`ComputeContext_perThreadData <computecontext_perthreaddata>`<> | contextPerThreadData | |
UInt32 | multithreadingDepthBackup | |
UInt32 | loggingDepthBackup |
Methods¶
MultithreadAdvisorBatchBracket ( in MultithreadAdvisorBatchBracket other ) | |
MultithreadAdvisorBatchBracket ( io MultithreadAdvisor mtAdvisor, in UInt32 batchIndex, io UInt32 batchStart, io UInt32 batchEnd ) | |
MultithreadAdvisorBatchBracket () | |
MultithreadAdvisorBatchBracket | clone ? () |
init ! ( io MultithreadAdvisor mtAdvisor, in UInt32 batchIndex, io UInt32 batchStart, io UInt32 batchEnd ) | |
~MultithreadAdvisorBatchBracket () |
Float32 (struct)¶
MultithreadAdvisor (object)¶
Members¶
Ref<ComputeContext> | computeContext | |
UInt32 | threadCount | |
UInt32 | coreCount | |
Boolean | enableMT | |
UInt32 | logLevel | |
String | name | |
Boolean | executing | |
Float32 | lastTime | |
Float32 | lastComputeTime | |
UInt32 | lastBatchCount | |
UInt32 | lastActiveThreadCount | |
Float32 | lastMultithreadingBenefit | |
Float32 | learnedMultithreadingBenefit | |
Float32 | previousLastTime | |
UInt32 | previousLastBatchCount | |
UInt32 | maxParallelDepth | |
UInt32 | multithreadingDepth | |
UInt32 | loggingDepth | |
MultithreadAdvisor_perThreadData[] | perThreadData | |
UInt32 | elementRange | |
UInt32 | batchSize |
Methods¶
MultithreadAdvisor ( in MultithreadAdvisor other ) | |
MultithreadAdvisor ( in String name ) | |
MultithreadAdvisor () | |
MultithreadAdvisor | clone ? () |
setMaxParallelExecuteDepth ! ( in UInt32 depth ) |
ComputeContext (object)¶
Members¶
ComputeContext_perThreadData[] | perThreadData | |
Float32 | calibrationDummyResult | |
Float32 | parallelExecuteOverhead | |
SInt32 | executingKLDFGBindings | |
String[40] | loggingIndentPerDepth | |
AsyncTaskQueue | asyncTaskQueue | Define it here so it’s in a singleton |
Methods¶
ComputeContext ( in ComputeContext other ) | |
ComputeContext () | |
ComputeContext | clone ? () |
Boolean | hasExecutingKLDFGBinding ? () |
Float32 | measureParallelEvalOverhead ! ( in Boolean printResult ) |
Functions¶
MultithreadingEnabled¶
Boolean MultithreadingEnabled ()
EnableMultithreading¶
EnableMultithreading ( in Boolean enable )
GetComputeContext¶
Ref<ComputeContext> GetComputeContext ()
NOTE: a Ref<> function will leak: see EDK issue #3327...
ForceLogTrace¶
ForceLogTrace ( in String trace )
ForceLogTrace: will log no matter GetLoggingLevel()
ForceLogSubTrace¶
ForceLogSubTrace ( in String trace )
ForceLogSubTrace: will log no matter GetLoggingLevel()
ForceIncreaseLogTraceIndent¶
ForceIncreaseLogTraceIndent ()
ForceDecreaseLogTraceIndent¶
ForceDecreaseLogTraceIndent ()
BeginKLDFGBindingExecution¶
BeginKLDFGBindingExecution ()
EndKLDFGBindingExecution¶
EndKLDFGBindingExecution ()
IsMultithreading¶
Boolean IsMultithreading ()
Returns true if multithreading is currently active for this thread.
注釈
This is only relevant if parallel execution is bracketed with a MultithreadAdvisorBracket
GetMultithreadingDepth¶
UInt32 GetMultithreadingDepth ()
Returns the current multithreading depth for this thread (0 == no multithreading).
注釈
This is only relevant if parallel execution is bracketed with a MultithreadAdvisorBracket