Go to the documentation of this file.
34 return (
f >= 0) ?
f : -
f;
78 float input[1*1*3*3] = {
79 0.1, 0.5, 0.75, -3, 2.5, 2, -2.1, 7.8, 100};
85 operands[0].
dims[0] = 1;
86 operands[0].
dims[1] = 1;
87 operands[0].
dims[2] = 3;
88 operands[0].
dims[3] = 3;
95 for (
int i = 0;
i <
sizeof(
input) /
sizeof(
float); ++
i) {
98 int expected_nan =
isnan(expected_output);
99 if ((!output_nan && !expected_nan &&
fabs(
output[
i] - expected_output) >
EPS) ||
100 (output_nan && !expected_nan) || (!output_nan && expected_nan)) {
101 printf(
"at index %d, output: %f, expected_output: %f\n",
i,
output[
i], expected_output);
111 int main(
int agrc,
char **argv)
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
static int test(DNNMathUnaryOperation op)
DNNMathUnaryOperation un_op
static __device__ float ceil(float a)
static __device__ float floor(float a)
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
void * data
data pointer with data length in bytes.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int ff_dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx)
Execute the Unary Math Layer.
static __device__ float fabs(float a)
int32_t dims[4]
there are two memory layouts, NHWC or NCHW, so we use dims, dims[0] is Number.
static float get_expected(float f, DNNMathUnaryOperation op)
printf("static const uint8_t my_array[100] = {\n")
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
#define i(width, name, range_min, range_max)
static av_always_inline av_const double round(double x)
int main(int agrc, char **argv)