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

problem about function sgm2 in adcensus.cu #18

Closed
Sarah20187 opened this issue Feb 10, 2017 · 2 comments
Closed

problem about function sgm2 in adcensus.cu #18

Sarah20187 opened this issue Feb 10, 2017 · 2 comments

Comments

@Sarah20187
Copy link

near line 579, the code as follows:


for (int i = 256; i > 0; i /= 2) {
		if (d < i && d + i < size3 && output_min[d + i] < output_min[d]) {
			output_min[d] = output_min[d + i];
		}
		__syncthreads();
	}

Should the initial number of i to be the max disparity here?

@jzbontar
Copy link
Owner

I haven't looked at this code for awhile, but it looks correct. I think i should be set to the largest power of two that is smaller than the highest max_disparity. I believe the highest max_disparity is 400 for some Middlebury samples, so setting i to 256 seems okay.

@Sarah20187
Copy link
Author

Thank you!

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