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

Twice usage of i in nested loop #181

Open
fetian-code opened this issue Nov 27, 2024 · 1 comment
Open

Twice usage of i in nested loop #181

fetian-code opened this issue Nov 27, 2024 · 1 comment

Comments

@fetian-code
Copy link

fetian-code commented Nov 27, 2024

image

I found in the loop of renderCUDA() in backward.cu, you use i twice in a nested loop. I wonder if it may cause an issue, because it seems the i in the inner loop will change the value of i in outer loop.

@hbb1
Copy link
Owner

hbb1 commented Dec 10, 2024

Oh Thank you for pointing out this. This will not cause issue because of the properties of C/CUDA. But definitely, we should replace the second $i$ with something like $j$ for avoiding misinterpretation and potential risks.

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