Sergio0694 / ComputeSharp

A .NET library to run C# code in parallel on the GPU through DX12, D2D1, and dynamically generated HLSL compute and pixel shaders, with the goal of making GPU computing easy to use for all .NET developers! 🚀
MIT License
2.65k stars 122 forks source link

Minor errors in the sample code #820

Closed imgits closed 2 weeks ago

imgits commented 3 weeks ago

The code in file ComputeSharp/samples/ComputeSharp.Benchmark/Blas/BlasHelpers.cs at line 97:

int x_offset = (ThreadIds.X * n * p) + (ThreadIds.Y * m);

Should it be:

int x_offset = (ThreadIds.X * n * m) + (ThreadIds.Y * m);

That is, change 'p' to 'm'

Sergio0694 commented 2 weeks ago

Fixed, thank you! 🙂