Commit Graph

2 Commits

Author SHA1 Message Date
Kenneth Moreland
18461d676f Add a unique symbol to InstantiationTemplate.cxx.in
A compiler or linker may give an error if a .cxx file is empty (that is,
declares no symbols). This can happen if an instantiation declaration
gets removed during the compile either through preprocessor macros or
SFINAE.

To protect against this, declare a simple integer with a unique symbol
in each instantiation file. The overhead is very small and will prevent
compile/link errors.
2022-03-28 09:18:23 -06:00
Kenneth Moreland
6eb9c9876c Add generalized instantiation
Recently, an instantiation method was added to the VTK-m configuration
files to set up a set of source files that compile instances of a template.
This allows the template instances to be compiled exactly once in separate
build files.

However, the implementation made the assumption that the instantiations
were happening for VTK-m filters. Now that the VTK-m filters are being
redesigned, this assumption is broken.

Thus, the instantiation code has been redesigned to be more general. It can
now be applied to code within the new filter structure. It can also be
applied anywhere else in the VTK-m source code.
2022-03-23 06:33:36 -06:00