so just moments later here comes an example for a c++ plugin
2d and 3d fluids used as reference to test the GPU version of the node17 visuals against
a standard visual studio c++/cli project:
- base classes are set to compiled without CLI support for SIMD instructions (extra setting per .cpp)
- c++/cli classes for the vvvv nodes
- wrapper classes which hold a pointer to the unmanaged base classes to bridge between managed and unmanaged
- release mode build: disable security checks, enabled enhanced instruction set (avx2), floating point model fast
- a c# project for the vvvv plugininterface dependencies, excluded from build, just for pulling the nugets
i ran some test with large arrays and nonlinear access in unmanaged c++ is substantially faster than in c#. and nonlinear already means not looping from 0 to length of array but skipping a few. note that this doesn’t apply once you compile with CLI. and as to be expected using avx to process 8 floats in parallel nearly increases performance by factor 8 on top.
an thoughts and hints on improvement welcome.