This section describes the configuration options of ILNumerics and how to apply them.
The ILNumerics.Settings class provides a number of public static properties used to configure the runtime behaviour of ILNumerics. The complete list is found in the Settings Member Class Reference.
ILNumerics uses default values for all members which are not determined by the user. In order to specify custom values two methods exist:
Most members of the Settings class are writable. At startup ILNumerics applys the default value to such configuration properties. This happens early at application start. Afterwards, writable members can be altered 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 the Program.Main() or Form_Initialize entry functions.
Using a Config file
The common application configuration mechanism can be used for configuration. This way deployment and automatic (re)configuration is simplified. 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. no hyperthreading cores), the value for Settings.MaxNumberThreads is set to '4' in the app.config file section: