blob: 04aa997876f67ddd2405288aa80b1a6107b4a7ac [file] [log] [blame]
<%!
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 <springbok.h>
#include <stdio.h>
#include <stdlib.h>
#include "pw_unit_test/framework.h"
#include "softrvv.h"
#include "test_v_helpers.h"
using namespace test_v_helpers;
${self.body()}