Lines Matching defs:round
134 SI U32 round (F v, F scale) { return (uint32_t)(v*scale + 0.5f); }
217 SI U32 round(F v, F scale) { return vcvtnq_u32_f32(v*scale); }
232 SI U32 round(F v, F scale) {
380 SI U32 round (F v, F scale) { return _mm256_cvtps_epi32(v*scale); }
711 SI U32 round(F v, F scale) { return _mm_cvtps_epi32(v*scale); }
983 return sk_bit_cast<F>(round(1.0f * (1<<23),
1271 // Any time we use round() we probably want to use to_unorm().
1272 return round(min(max(0, v), bias), scale);
3100 // First we compute v + ((v+128)>>8), then one more round of (...+128)>>8 to finish up:
4004 auto round = [](F x) { return cast<U16>(x * 255.0f + 0.5f); };
4008 *r = round(min(max(0,R), limit));
4009 *g = round(min(max(0,G), limit));
4010 *b = round(min(max(0,B), limit));
4011 *a = round(A); // we assume alpha is already in [0,1].