ComputeContext.kl

Types

LogTraceIndentBracket (struct)

A simple helper for bracketing RTRScheduler debug trace indentation.

Members

Ref<ComputeContext> computeContext  
UInt32 threadIndex  
UInt32 depthBackup  

MultithreadAdvisorBracket (struct)

Members

Ref<MultithreadAdvisor> mtAdvisor  
UInt64 startTick  
UInt32 threadId  

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)

Methods

  Float32 ( in Float32 other )
  Float32 ()
Float32 atomicGet ! ()
Float32 clone ? ()
Float32 linearInterpolate ? ( in Float32 other, in Scalar t )

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  

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 ()

_GetLoggingLevel

UInt32 _GetLoggingLevel ()

EnableMultithreading

EnableMultithreading ( in Boolean enable )

_SetLoggingLevel

_SetLoggingLevel ( in UInt32 level )

MicroSleep

MicroSleep ( in UInt32 ms )

GetLoggingLevel

UInt32 GetLoggingLevel ()

SetLoggingLevel

SetLoggingLevel ( in UInt32 level )

GetComputeContext

Ref<ComputeContext> GetComputeContext ()

NOTE: a Ref<> function will leak: see EDK issue #3327...

LogTrace

LogTrace ( in String trace )

ForceLogTrace

ForceLogTrace ( in String trace )

ForceLogTrace: will log no matter GetLoggingLevel()

ForceLogSubTrace

ForceLogSubTrace ( in String trace )

ForceLogSubTrace: will log no matter GetLoggingLevel()

LogSubTrace

LogSubTrace ( in String trace )

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

LogActiveWaitTime

LogActiveWaitTime ( in Float32 time )