| <%! | |
| import numpy as np | |
| def get_test_inputs(dtype, N, allow_zero=True): | |
| ii32 = np.iinfo(dtype) | |
| src1_data = np.random.randint(ii32.min, ii32.max, N).astype(dtype) | |
| src2_data = np.random.randint(ii32.min, ii32.max, N).astype(dtype) | |
| rs1 = dtype(np.random.randint(ii32.min, ii32.max)) | |
| if not allow_zero: | |
| src2_data[src2_data==0] = 1 | |
| rs1 = 1 if rs1 == 0 else rs1 | |
| return src1_data, src2_data, rs1 | |
| %> | |
| /* File is auto-generated. */ | |
| #include <riscv_vector.h> | |
| #include <springbok.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include "pw_unit_test/framework.h" | |
| #include "softrvv.h" | |
| ${self.body()} |