Data Structures

The user can define her own data structure for each module to maintain problem data and any other information the user needs access to in order to implement functions to customize the solver. A pointer to this data structure is maintained by SYMPHONY and is passed to the user as an argument to each user function. The pointer must be initially passed using the sym_set_user_data() command. Since SYMPHONY knows nothing about this data structure, it is up to the user to allocate it and maintain it. The user must also implement a function to free it. The functions for freeing the user data structures in each module are called user_free_*, where * is the module. These functions are called by SYMPHONY at the time when other data structures for the modules are being freed and the module is being closed. By default, for sequential computation, there is one common user data structure for all modules and the pointer to that data structure is passed to all user functions, regardless of the module. This setup should work fine for most sequential applications. In parallel, however, pointers cannot be shared between modules and data must be explicitly passed. In this case, it is sometimes more efficient to maintain in each module only the data necessary to perform the functions of that module.

Ted Ralphs
2007-12-21