A port of tesla-engine (http://www.tesla-engine.net/) from c# to unmanaged c++