Psi Lambda LLC ψ(λκ) Kappa Library User Guide

Kappa Configuration

The KappaConfigFile library may be used completely independently of the Kappa library. Alternatively, you may retrieve a copy of the KappaConfigFile object from the Kappa instance and use it for any purpose at the same time that Kappa is using it. KappConfig objects, such as KappaConfigFile, may be given additional KappaConfig objects that they will use when trying to find a value.

In addition to any directory paths passed to it, the KappaConfigFile object checks the “KAPPA_CONFIG_PATH” environment variable for a semicolon delimited list of directories to parse for configuration files. A configuration file must have a ".conf" file extension or it will be ignored.

Within a configuration file, empty lines or lines that have a pound sign (or a pound sign with spaces in front of it) at the beginning are ignored.

Configuration sections must be on a separate line and must have square brackets surrounding them. The section name could be any text string but supported values start with a slash and resemble a *nix file path—spaces are stripped off of the beginning and the end of the text string:


Within a section, there should be labels followed by an equal sign, '=', followed by a value or labels followed by an ampersand equal sign, '&=', followed by a value. Any spaces at the beginning or the end of the labels are stripped off. Any spaces at the beginning or the end of the value are also stripped off. (If it is really necessary preserve spaces at the beginning and end of the values, use quotes around the values and then strip off the quotes.)

If an equal sign is used, then, if that section and label combination appear in multiple locations (i.e. in the same file or in different files or in different files in different directories), then the last one encountered is the value stored for that section and label. KappaConfigFile prints a warning to standard error whenever a section and label value are overwritten in this manner. There may be no way to determine which of the possible values will the result value so it is best to try to avoid this situation.

If an ampersand and equal sign combination is used, then the value is appended to the preceding value(s) with a newline character preceding it. This format is useful for putting the contents of a file into a single configuration value. Please look at the kappa_project.conf file for an example of how this may be used.

Suggested configuration directories

For Microsoft Windows, the recommended (and default) configuration file directories are:




for system wide configuration files and


for user specific files, where CommonProgramFiles, ALLUSERSPROFILE, and APPDATA are standard Microsoft Windows environment variables defining the standard Microsoft Windows path locations.

For all other platforms, the recommended (and default) configuration file directories are:


for system wide configuration files and


for user specific files.

Kappa configuration files and section names

Kappa reserves any section name starting with "/kappa", with any combination of lower or upper case letters, for its use. The developer may change the values in these sections as appropriate.

Supplied Configuration File

Section Name

Configuration Section Description



Provides translation of enumerations and macro definitions from cuda.h.



Provides translation of enumerations and macro definitions for the Kappa library.



Provides byte sizes of some common data types.


Available for user defined translations.



Used by the Kappa library Kappa class.



Used by the Kappa library kappa::CUDA::Module class.



Used by the Kappa library kappa::C::Module class.



Used by the Kappa library kappa::Process class for creating project files for output routines.


Available for user defined setting values.



If enabled by a method of the kappa::Process class, defines keywords to load. This section should only consist of labels in the form:
where CSV is a new keyword and kappa::Process will assume that there is a section named:
or equivalent for the new keyword.



A section for automatically loading the shared library that provides the kappa::command::keywordCSV example class.
NOTE: THE KEYWORD CLASS SHARED LIBRARIES MUST HAVE BEEN COMPILED WITH THE SAME ABI (APPLICATION BINARY INTERFACE) VERSION OF KAPPA. Consider carefully whether to use this feature in this manner. See the section on the kappa::command::keywordCSV example class for other, safer methods.