initial import, more tuning and refining required
Now project is Visual C, but it has to be moved to standard plain C with CUDA Extensions