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

the means of right_buffer? #84

Open
PrinceDouble opened this issue Dec 6, 2024 · 0 comments
Open

the means of right_buffer? #84

PrinceDouble opened this issue Dec 6, 2024 · 0 comments

Comments

@PrinceDouble
Copy link

hi, i have some question about the means of right_buffer and right_x , the codes of this pro pretty good! I am trouble in understand the codes when i read the right_buffer , can you give me more careful introduce about the right_buffer and right_x, thank you!

  1. shared CENSUS_TYPE right_buffer[2 * DP_BLOCK_SIZE][RIGHT_BUFFER_ROWS + 1];

  2. for (unsigned int i0 = 0; i0 < RIGHT_BUFFER_SIZE; i0 += BLOCK_SIZE) {

     	const unsigned int i = i0 + threadIdx.x;
     	if (i < RIGHT_BUFFER_SIZE) {
     		const int right_x = static_cast<int>(right_x0 + PATHS_PER_BLOCK - 1 - i - min_disp);
     		const CENSUS_TYPE right_value = load_census_with_check(&right[y * width], right_x, width);
     		const unsigned int lo = i % DP_BLOCK_SIZE;
     		const unsigned int hi = i / DP_BLOCK_SIZE;
     		right_buffer[lo][hi] = right_value;
     		if (hi > 0) {
     			right_buffer[lo + DP_BLOCK_SIZE][hi - 1] = right_value;
     		}
     	}
     }
    
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

1 participant