How to rewrite array from row-order to column-order?

后端 未结 5 1819
遥遥无期
遥遥无期 2020-12-31 16:33

I have this double for-loop, where I have both row-order and column-order array indexing, which should be bad for performance.

  for (int row = 0; row < h         


        
5条回答
  •  我在风中等你
    2020-12-31 17:14

    Isn't this the cause of your data skew? All the negative values are being zeroed out:

    if (d < 0) { d = 0; }
    

提交回复
热议问题