Skip to content

为什么 d_NL[(count++) * N + n1] 是合并访问的? #45

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

Open
FeiGSSS opened this issue Apr 28, 2025 · 1 comment
Open

为什么 d_NL[(count++) * N + n1] 是合并访问的? #45

FeiGSSS opened this issue Apr 28, 2025 · 1 comment

Comments

@FeiGSSS
Copy link

FeiGSSS commented Apr 28, 2025

Image Image

老师您好,

我不明白为什么 d_NL[(count++) * N + n1] 一定能保证合并内存访问? 每个 n1 的 count 增长不是同步的,也就是说每个线程对于 d_NL 的访存地址可能差距好几个 N。那为什么这样能实现合并访问呢? 还是说,只能保证 count = 0 时是合并的?

@fever-Wong
Copy link

fever-Wong commented Apr 28, 2025 via email

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