Configuration
This section describes the configuration options of ILNumerics and how to apply them.
Settings
The ILNumerics.Settings class provides a number of public static members used to configure the runtime behaviour of ILNumerics. The complete list is found
in the
Settings member class reference.
Configuration Methods
ILNumerics uses default values for all members which are not determined by the user. In order to specify custom values two methods exist:
- Programmatic Configuration
Most members of the
Settingsclass are writable. At startup ILNumerics applys the default values to any setting member. This happens early at application start. Afterwards, any writable member can be altered at anytime. Make sure, to set the correct value before a related section is used in your algorithm. A good place for configuration is the application start section, lets say theProgram.Main()orForm_Initializeentry functions. - Using a Config file
The common application configuration mechanism can be used for configuration. That way eases deployment and automatic (re)configuration scenarios. Regular application configuration entries in the appSettings section of the app.config file are therefore identified by ILNumerics and used as replacement for its own default values. In order to map application configuration values to ILNumerics setting members, the keys in the app.config section must correspond to the names of the Setting members, prefixed by the string 'ILN'.
Example: In order to configure 4 threads for parallel execution on processors with at least 4 (real) cores (i.e. without hyperthreading), the value for
Settings.MaxNumberThreads
is set to '4' in the app.config file section:
<configuration>
<appSettings>
<add key="ILNMaxNumberThreads" value="4"/>
</appSettings>
</configuration>