-
+ EF003DD5035581C12D242FA697E39248A2B1E26CE2EB0713F4BAC79816FE602174C3280840B698593456FAE2983D249493570FC86C5BC9B1E80FD715E1E44438
ffa/libffa/fz_pred.adb
(0 . 0)(1 . 29)
601 with W_Pred; use W_Pred;
602
603
604 package body FZ_Pred is
605
606 ---------------------------------------------------------------------------
607 -- Fundamental Predicate Operations on FZ (finite integers)
608 ---------------------------------------------------------------------------
609
610 -- 1 iff N == 0 (branch-free); else 0
611 function FZ_ZeroP(N : in FZ) return WBool is
612 A : WBool := 1;
613 begin
614 for i in N'Range loop
615 A := A and W_ZeroP(N(i));
616 end loop;
617 return A;
618 end FZ_ZeroP;
619 pragma Inline_Always(FZ_ZeroP);
620
621
622 -- 1 iff N is odd
623 function FZ_OddP(N : in FZ) return WBool is
624 begin
625 return W_OddP(N(N'First));
626 end FZ_OddP;
627 pragma Inline_Always(FZ_OddP);
628
629 end FZ_Pred;