First Comit - CUDA part
First Commit - Matlab side