Lines Matching refs:a
604 static inline unsigned int div32(unsigned int a, unsigned int b, in div32() argument
611 *r = a % b; in div32()
612 return a / b; in div32()
615 static inline unsigned int div_down(unsigned int a, unsigned int b) in div_down() argument
619 return a / b; in div_down()
622 static inline unsigned int div_up(unsigned int a, unsigned int b) in div_up() argument
628 q = div32(a, b, &r); in div_up()
634 static inline unsigned int mul(unsigned int a, unsigned int b) in mul() argument
636 if (a == 0) in mul()
638 if (div_down(UINT_MAX, a) < b) in mul()
640 return a * b; in mul()
643 static inline unsigned int muldiv32(unsigned int a, unsigned int b, in muldiv32() argument
646 u_int64_t n = (u_int64_t) a * b; in muldiv32()
743 void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interv… in snd_interval_mul() argument
745 if (a->empty || b->empty) { in snd_interval_mul()
750 c->min = mul(a->min, b->min); in snd_interval_mul()
751 c->openmin = (a->openmin || b->openmin); in snd_interval_mul()
752 c->max = mul(a->max, b->max); in snd_interval_mul()
753 c->openmax = (a->openmax || b->openmax); in snd_interval_mul()
754 c->integer = (a->integer && b->integer); in snd_interval_mul()
767 void snd_interval_div(const struct snd_interval *a, const struct snd_interval *b, struct snd_interv… in snd_interval_div() argument
770 if (a->empty || b->empty) { in snd_interval_div()
775 c->min = div32(a->min, b->max, &r); in snd_interval_div()
776 c->openmin = (r || a->openmin || b->openmax); in snd_interval_div()
778 c->max = div32(a->max, b->min, &r); in snd_interval_div()
783 c->openmax = (a->openmax || b->openmin); in snd_interval_div()
802 void snd_interval_muldivk(const struct snd_interval *a, const struct snd_interval *b, in snd_interval_muldivk() argument
806 if (a->empty || b->empty) { in snd_interval_muldivk()
811 c->min = muldiv32(a->min, b->min, k, &r); in snd_interval_muldivk()
812 c->openmin = (r || a->openmin || b->openmin); in snd_interval_muldivk()
813 c->max = muldiv32(a->max, b->max, k, &r); in snd_interval_muldivk()
818 c->openmax = (a->openmax || b->openmax); in snd_interval_muldivk()
833 void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, in snd_interval_mulkdiv() argument
837 if (a->empty || b->empty) { in snd_interval_mulkdiv()
842 c->min = muldiv32(a->min, k, b->max, &r); in snd_interval_mulkdiv()
843 c->openmin = (r || a->openmin || b->openmax); in snd_interval_mulkdiv()
845 c->max = muldiv32(a->max, k, b->min, &r); in snd_interval_mulkdiv()
850 c->openmax = (a->openmax || b->openmin); in snd_interval_mulkdiv()