mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Vectorize loop.
This commit is contained in:
parent
96cd782011
commit
cf5ee65604
@ -3231,12 +3231,13 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover )
|
||||
{
|
||||
auto tmp = it;
|
||||
++tmp;
|
||||
while( tmp != end )
|
||||
const auto sz = end - tmp;
|
||||
for( size_t i=0; i<sz; i++ )
|
||||
{
|
||||
if( tmp->val < min ) min = tmp->val;
|
||||
else if( tmp->val > max ) max = tmp->val;
|
||||
++tmp;
|
||||
min = tmp[i].val < min ? tmp[i].val : min;
|
||||
max = tmp[i].val > max ? tmp[i].val : max;
|
||||
}
|
||||
tmp += sz;
|
||||
}
|
||||
|
||||
const auto revrange = 1.0 / ( max - min );
|
||||
|
Loading…
Reference in New Issue
Block a user