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

Potential Redundancy in balance_count Function #14

Open
NiceBlueChai opened this issue Jan 14, 2025 · 0 comments
Open

Potential Redundancy in balance_count Function #14

NiceBlueChai opened this issue Jan 14, 2025 · 0 comments

Comments

@NiceBlueChai
Copy link

In the balance_count function, the last four lines seem to adjust the counter and globalcount values. However, it appears that these adjustments might be redundant or unnecessary.

static __inline__ void balance_count(void)	
{
	countermax = globalcountmax -		
	             globalcount - globalreserve;
	countermax /= num_online_threads();	
	globalreserve += countermax;		
	counter = countermax / 2;		
	if (counter > globalcount)		
		counter = globalcount;		
	globalcount -= counter;			
}
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