Lines Matching refs:a
539 static inline unsigned int div32(unsigned int a, unsigned int b, in div32() argument
546 *r = a % b; in div32()
547 return a / b; in div32()
550 static inline unsigned int div_down(unsigned int a, unsigned int b) in div_down() argument
554 return a / b; in div_down()
557 static inline unsigned int div_up(unsigned int a, unsigned int b) in div_up() argument
563 q = div32(a, b, &r); in div_up()
569 static inline unsigned int mul(unsigned int a, unsigned int b) in mul() argument
571 if (a == 0) in mul()
573 if (div_down(UINT_MAX, a) < b) in mul()
575 return a * b; in mul()
578 static inline unsigned int muldiv32(unsigned int a, unsigned int b, in muldiv32() argument
581 u_int64_t n = (u_int64_t) a * b; in muldiv32()
682 void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interv… in snd_interval_mul() argument
684 if (a->empty || b->empty) { in snd_interval_mul()
689 c->min = mul(a->min, b->min); in snd_interval_mul()
690 c->openmin = (a->openmin || b->openmin); in snd_interval_mul()
691 c->max = mul(a->max, b->max); in snd_interval_mul()
692 c->openmax = (a->openmax || b->openmax); in snd_interval_mul()
693 c->integer = (a->integer && b->integer); in snd_interval_mul()
706 void snd_interval_div(const struct snd_interval *a, const struct snd_interval *b, struct snd_interv… in snd_interval_div() argument
709 if (a->empty || b->empty) { in snd_interval_div()
714 c->min = div32(a->min, b->max, &r); in snd_interval_div()
715 c->openmin = (r || a->openmin || b->openmax); in snd_interval_div()
717 c->max = div32(a->max, b->min, &r); in snd_interval_div()
722 c->openmax = (a->openmax || b->openmin); in snd_interval_div()
741 void snd_interval_muldivk(const struct snd_interval *a, const struct snd_interval *b, in snd_interval_muldivk() argument
745 if (a->empty || b->empty) { in snd_interval_muldivk()
750 c->min = muldiv32(a->min, b->min, k, &r); in snd_interval_muldivk()
751 c->openmin = (r || a->openmin || b->openmin); in snd_interval_muldivk()
752 c->max = muldiv32(a->max, b->max, k, &r); in snd_interval_muldivk()
757 c->openmax = (a->openmax || b->openmax); in snd_interval_muldivk()
772 void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, in snd_interval_mulkdiv() argument
776 if (a->empty || b->empty) { in snd_interval_mulkdiv()
781 c->min = muldiv32(a->min, k, b->max, &r); in snd_interval_mulkdiv()
782 c->openmin = (r || a->openmin || b->openmax); in snd_interval_mulkdiv()
784 c->max = muldiv32(a->max, k, b->min, &r); in snd_interval_mulkdiv()
789 c->openmax = (a->openmax || b->openmin); in snd_interval_mulkdiv()