Looks like this variable ("k") is not needed and can be removed: https://github.com/microsoft/DirectX-Graphics-Samples/blob/e4d1dd7394e35a69247fb38fe2abbae2b08a8b41/MiniEngine/Core/Shaders/Bitonic32InnerSortCS.hlsl#L29C10-L29C11