For the sake of clarity, an exemplary plugin implementation is provided, which not only depicts the utilization of the developed framework with respect to using already available implementations in plugins, but is also a reference for the subsequent investigation of the implementation details.
The plugin wraps a ViennaCL [1] iterative linear solver implementation, a high-performance reusable linear solver component supporting shared-memory computing platforms as well as accelerators (Section 5.1). Utilizing ViennaCL in this example additionally underlines the straightforward applicability of our framework with respect to utilizing already available implementations.
In the following, the full implementation of a simplistic ViennaCL-powered iterative solver plugin is given.
The plugin’s name (Line 2), class definition (Lines 4), and required macros - automatically generating boilerplate code required for the plugin mechanism - are implemented (Lines 5, 20). The data dependencies are set up in the initialization part (Lines 7-10). Two input sockets (A, b) and one output socket (x) are created in ViennaX’s central socket database, relating to the linear system . The data associated with the sockets are accessed (Lines 14-16) and the system is solved by using ViennaCL’s biconjugate gradient stabilized linear solver [1] (Line 18). The result vector x is automatically available to other plugins via the outgoing data connection.