Set a number of options from the command-line arguments.
(self)
| 821 | self._linear_rounds = change |
| 822 | |
| 823 | def options_from_args(self): |
| 824 | """Set a number of options from the command-line arguments.""" |
| 825 | if "trunc_pr" in self.args: |
| 826 | self.use_trunc_pr = True |
| 827 | if "signed_trunc_pr" in self.args: |
| 828 | self.use_trunc_pr = -1 |
| 829 | if "trunc_pr20" in self.args: |
| 830 | self.use_trunc_pr = 20 |
| 831 | if "split" in self.args or "split3" in self.args: |
| 832 | self.use_split(3) |
| 833 | for arg in self.args: |
| 834 | m = re.match("split([0-9]+)", arg) |
| 835 | if m: |
| 836 | self.use_split(int(m.group(1))) |
| 837 | m = re.match("unsplit([0-9]+)", arg) |
| 838 | if m: |
| 839 | self.use_unsplit = int(m.group(1)) |
| 840 | if "raw" in self.args: |
| 841 | self.always_raw(True) |
| 842 | if "edabit" in self.args: |
| 843 | self.use_edabit(True) |
| 844 | if "invperm" in self.args: |
| 845 | self.use_invperm(True) |
| 846 | if "linear_rounds" in self.args: |
| 847 | self.linear_rounds(True) |
| 848 | if "back_mulm" in self.args: |
| 849 | self.use_mulm = -1 |
| 850 | |
| 851 | def disable_memory_warnings(self): |
| 852 | self.warn_about_mem.append(False) |
no test coverage detected