42 return (f1 < f2) ? f1 : f2;
44 return (
float)((
int)(f1) % (
int)(f2));
56 float input[1*1*2*3] = {
57 -3, 2.5, 2, -2.1, 7.8, 100
67 operands[0].
dims[0] = 1;
68 operands[0].
dims[1] = 1;
69 operands[0].
dims[2] = 2;
70 operands[0].
dims[3] = 3;
77 for (
int i = 0;
i <
sizeof(
input) /
sizeof(
float);
i++) {
80 printf(
"op %d, at index %d, output: %f, expected_output: %f (%s:%d)\n",
81 op,
i,
output[
i], expected_output, __FILE__, __LINE__);
96 float input[1*1*2*3] = {
97 -3, 2.5, 2, -2.1, 7.8, 100
107 operands[0].
dims[0] = 1;
108 operands[0].
dims[1] = 1;
109 operands[0].
dims[2] = 2;
110 operands[0].
dims[3] = 3;
113 input_indexes[0] = 0;
117 for (
int i = 0;
i <
sizeof(
input) /
sizeof(
float);
i++) {
120 printf(
"op %d, at index %d, output: %f, expected_output: %f (%s:%d)\n",
121 op,
i,
output[
i], expected_output, __FILE__, __LINE__);
136 float input0[1*1*2*3] = {
137 -3, 2.5, 2, -2.1, 7.8, 100
139 float input1[1*1*2*3] = {
140 -1, 2, 3, -21, 8, 10.0
148 operands[0].
data = input0;
149 operands[0].
dims[0] = 1;
150 operands[0].
dims[1] = 1;
151 operands[0].
dims[2] = 2;
152 operands[0].
dims[3] = 3;
153 operands[1].
data = input1;
154 operands[1].
dims[0] = 1;
155 operands[1].
dims[1] = 1;
156 operands[1].
dims[2] = 2;
157 operands[1].
dims[3] = 3;
160 input_indexes[0] = 0;
161 input_indexes[1] = 1;
165 for (
int i = 0;
i <
sizeof(input0) /
sizeof(
float);
i++) {
168 printf(
"op %d, at index %d, output: %f, expected_output: %f (%s:%d)\n",
169 op,
i,
output[
i], expected_output, __FILE__, __LINE__);
193 int main(
int argc,
char **argv)