Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

22 transform_matrix2D 代码基本上都是错误的 #12

Open
saladjay opened this issue Dec 28, 2022 · 1 comment
Open

22 transform_matrix2D 代码基本上都是错误的 #12

saladjay opened this issue Dec 28, 2022 · 1 comment

Comments

@saladjay
Copy link

saladjay commented Dec 28, 2022

转置方法0和1代码能运行成功是因为
int nx = 289;
int ny = 289;
原文设置成了1<<12,nx和ny都是2的倍数才可以转置成功。方法5也有同样的问题。

在switch里case4 和case5执行的函数一样,是笔误。

在最后比较cpu和gpu的输出时,使用了同样的两个指针比较,所有方法结果都是正确的,这里也是一个笔误。希望作者更新一下。

@Hollis7
Copy link

Hollis7 commented Mar 30, 2023

transformMatrix2D_CPU函数修改成out[i * ny + j] = in[j * nx + i],然后自己定义A_from_gpu传递一下值。其他的细节在改改。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants