[vtk-developers] Caching library

Bc. Lukas HRUDA hrudalu at students.zcu.cz
Sat Oct 29 14:09:58 EDT 2016


Hello,
We are aware that many VTK filtres are implemented so that when input values of two successive calls are the same, the filter performs the calculation only once (during the first call). However, what if the repetitive pattern is a more complex? For example, the pattern could be 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, in which case you probably agree with me that it would be very benefitial to calculate the output for input 1 once and for input 2 once.
Of course in general we don't know the pattern in advance and the set of possible inputs can be very large.

I am a student at the University of West Bohemia, Faculty of Applied Science, Department of Computer Science, Czech Republic.
As a part of my bachelor thesis I have designed and implemented a small library that can be used for caching results of time consuming calculations in such cases.
The library was integrated and tested in a visualisation application for medical data which is based on VTK.
The library aims to reduce number of repeated calculations that take noticeable time (what is considered noticeable may differ from case to case, in some cases it can be 1 second, in other cases it can be 30 milliseconds).
The library's system works in a way that when the programmer runs any calculation through it, it remembers the input and output and if a calculation with the same input is run through it againt later, it does not start the calculation and returns the remembered result instead.
The library does this whole process itself without programmers interaction, it just needs to be properly initialized.
It is very generic, so it can be used for caching almost any type of data.

Me and the supervisor of my bachelor thesis thought that this library could be useful for you and we decided that we would like to integrate it into the VTK.
It can be used to significantly speed up visualisations where any time consuming calculation may occur more than once.

Would you be interested to have our library integrated in VTK, perhaps as an optional modul, so that VTK programmers could use it to speed up their filters or whole applications? Please note that the library uses variadic templates so it needs C++11 to compile.
If you have any questions about the library I will be glad to answer them.

Best regards
Lukas Hruda
 
 
 

 




More information about the vtk-developers mailing list