2 #include "smaug/operators/smv/kernels/params.h"
11 return (
v8bl_t){ (bool)a[0], (
bool)a[1], (bool)a[2], (
bool)a[3],
12 (bool)a[4], (
bool)a[5], (bool)a[6], (
bool)a[7] };
20 float16* host_inputs1,
30 VEC_ARRAY_1D(
v8fp_t, _inputs0, inputs0);
31 VEC_ARRAY_1D(
v8fp_t, _inputs1, inputs1);
32 VEC_ARRAY_1D(
v8bl_t, _results, results);
35 for (
int i = 0; i < inputs_size /
VECTOR_SIZE; i++) {
36 v8sfx_t result = _inputs0[i] < _inputs1[i];
37 _results[i] = convert_to_bool(result);
41 dmaStore(host_results, results, inputs_size *
sizeof(
bool));
49 float16* host_inputs1,
59 VEC_ARRAY_1D(
v8fp_t, _inputs0, inputs0);
60 VEC_ARRAY_1D(
v8fp_t, _inputs1, inputs1);
61 VEC_ARRAY_1D(
v8bl_t, _results, results);
64 for (
int i = 0; i < inputs_size /
VECTOR_SIZE; i++) {
65 v8sfx_t result = _inputs0[i] <= _inputs1[i];
66 _results[i] = convert_to_bool(result);
70 dmaStore(host_results, results, inputs_size *
sizeof(
bool));
78 float16* host_inputs1,
88 VEC_ARRAY_1D(
v8fp_t, _inputs0, inputs0);
89 VEC_ARRAY_1D(
v8fp_t, _inputs1, inputs1);
90 VEC_ARRAY_1D(
v8bl_t, _results, results);
93 for (
int i = 0; i < inputs_size /
VECTOR_SIZE; i++) {
94 v8sfx_t result = _inputs0[i] > _inputs1[i];
95 _results[i] = convert_to_bool(result);
99 dmaStore(host_results, results, inputs_size *
sizeof(
bool));
107 float16* host_inputs1,
117 VEC_ARRAY_1D(
v8fp_t, _inputs0, inputs0);
118 VEC_ARRAY_1D(
v8fp_t, _inputs1, inputs1);
119 VEC_ARRAY_1D(
v8bl_t, _results, results);
122 for (
int i = 0; i < inputs_size /
VECTOR_SIZE; i++) {
123 v8sfx_t result = _inputs0[i] >= _inputs1[i];
124 _results[i] = convert_to_bool(result);
128 dmaStore(host_results, results, inputs_size *
sizeof(
bool));