C++ Amp + C# implementation