42 return (f1 < f2) ? f1 : f2;
54 float input[1*1*2*3] = {
55 -3, 2.5, 2, -2.1, 7.8, 100
65 operands[0].
dims[0] = 1;
66 operands[0].
dims[1] = 1;
67 operands[0].
dims[2] = 2;
68 operands[0].
dims[3] = 3;
75 for (
int i = 0;
i <
sizeof(
input) /
sizeof(
float);
i++) {
78 printf(
"op %d, at index %d, output: %f, expected_output: %f (%s:%d)\n",
79 op,
i,
output[
i], expected_output, __FILE__, __LINE__);
94 float input[1*1*2*3] = {
95 -3, 2.5, 2, -2.1, 7.8, 100
105 operands[0].
dims[0] = 1;
106 operands[0].
dims[1] = 1;
107 operands[0].
dims[2] = 2;
108 operands[0].
dims[3] = 3;
111 input_indexes[0] = 0;
115 for (
int i = 0;
i <
sizeof(
input) /
sizeof(
float);
i++) {
118 printf(
"op %d, at index %d, output: %f, expected_output: %f (%s:%d)\n",
119 op,
i,
output[
i], expected_output, __FILE__, __LINE__);
134 float input0[1*1*2*3] = {
135 -3, 2.5, 2, -2.1, 7.8, 100
137 float input1[1*1*2*3] = {
138 -1, 2, 3, -21, 8, 10.0
146 operands[0].
data = input0;
147 operands[0].
dims[0] = 1;
148 operands[0].
dims[1] = 1;
149 operands[0].
dims[2] = 2;
150 operands[0].
dims[3] = 3;
151 operands[1].
data = input1;
152 operands[1].
dims[0] = 1;
153 operands[1].
dims[1] = 1;
154 operands[1].
dims[2] = 2;
155 operands[1].
dims[3] = 3;
158 input_indexes[0] = 0;
159 input_indexes[1] = 1;
163 for (
int i = 0;
i <
sizeof(input0) /
sizeof(
float);
i++) {
166 printf(
"op %d, at index %d, output: %f, expected_output: %f (%s:%d)\n",
167 op,
i,
output[
i], expected_output, __FILE__, __LINE__);
191 int main(
int argc,
char **argv)