mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 14:03:52 +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;
|
auto tmp = it;
|
||||||
++tmp;
|
++tmp;
|
||||||
while( tmp != end )
|
const auto sz = end - tmp;
|
||||||
|
for( size_t i=0; i<sz; i++ )
|
||||||
{
|
{
|
||||||
if( tmp->val < min ) min = tmp->val;
|
min = tmp[i].val < min ? tmp[i].val : min;
|
||||||
else if( tmp->val > max ) max = tmp->val;
|
max = tmp[i].val > max ? tmp[i].val : max;
|
||||||
++tmp;
|
|
||||||
}
|
}
|
||||||
|
tmp += sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto revrange = 1.0 / ( max - min );
|
const auto revrange = 1.0 / ( max - min );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user