.NET Matrix Library
DynamicThreads Property
See Also  Send Feedback



Defines whether NML is allowed to dynamically change the number of threads used at runtime.

Syntax

Visual Basic (Declaration) 
Public Shared Property DynamicThreads As Boolean
Visual Basic (Usage)Copy Code
Dim value As Boolean
 
NmlConfiguration.DynamicThreads = value
 
value = NmlConfiguration.DynamicThreads
C# 
public static bool DynamicThreads {get; set;}
C++/CLI 
public:
static property bool DynamicThreads {
   bool get();
   void set (    bool value);
}

Property Value

A boolean value. Default is true.

Remarks

The default value is true. If DynamiceThreads is true, NML is called from a non parallel region and the matrix size is large enough, NML will attempt to use all available physical cores.

Nested parallelism can lead to performance degradation. If DynamicThreads is set to true and NML detects that is called from a parallel region, then it will attempt to run on a single thread. In this case, setting DynamicThreads to false and using SetNumThreads to specify the desired number of threads will allow nested threading.

Requirements

Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7

See Also

.NET Matrix Library