Next: Dynamic Plugins
Up: Implementation
Previous: Multiple Data Types
Contents
OpenVL is built so that it compiles into a shared library. A shared library is a dynamically linked
library which applications can link to at run time rather than at compile time (as with static libraries).
This gives OpenVL all the benefits of shared libraries. One main advantage to this approach is that
the applications that link to the shared library can reap the benefits of an updated version of the
library without recompiling the application itself. That is, all applications using OpenVL will
automatically benefit from any update to the OpenVL library without recompiling. Another advantage
is that the memory consumption is reduced when multiple applications use the library as only
one instance of the library remains in memory.
We have seen that OpenVL uses templates internally to support multiple data types. Here, we
present OpenVL as a pre-compiled shared library that applications use
at run time. Since templates are instantiated at compile time, it becomes difficult to
pre-compile code for all the different data types, and impossible to pre-compile code
for unknown data types. To solve this problem, we pre-compile code only for commonly used
data types. For any other data type, there are two possiblities. The first is to compile the
code for the new data type into the user application itself. This way, the code for commonly used
data types is inside OpenVL, and the code for the new data type is inside the user application.
The second option is to recompile OpenVL with support for the new data type.
We have made the list of compile-time data types configurable so that users can
easily add new data types and recompile OpenVL.
Next: Dynamic Plugins
Up: Implementation
Previous: Multiple Data Types
Contents
Sarang Lakare
2002-12-23