- replaced MIN/MAX in common code.
This commit is contained in:
parent
07a181090b
commit
eb69bbcae0
63 changed files with 200 additions and 236 deletions
|
|
@ -78,7 +78,7 @@ public:
|
|||
// The number of lines to skip to reach the first line to be rendered by this thread
|
||||
int skipped_by_thread(int first_line)
|
||||
{
|
||||
int clip_first_line = MAX(first_line, numa_start_y);
|
||||
int clip_first_line = max(first_line, numa_start_y);
|
||||
int core_skip = (num_cores - (clip_first_line - core) % num_cores) % num_cores;
|
||||
return clip_first_line + core_skip - first_line;
|
||||
}
|
||||
|
|
@ -86,9 +86,9 @@ public:
|
|||
// The number of lines to be rendered by this thread
|
||||
int count_for_thread(int first_line, int count)
|
||||
{
|
||||
count = MIN(count, numa_end_y - first_line);
|
||||
count = min(count, numa_end_y - first_line);
|
||||
int c = (count - skipped_by_thread(first_line) + num_cores - 1) / num_cores;
|
||||
return MAX(c, 0);
|
||||
return max(c, 0);
|
||||
}
|
||||
|
||||
// Calculate the dest address for the first line to be rendered by this thread
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue