MCPcopy Create free account
hub / github.com/ARM-software/armnn / FloorDivFP32Test

Function FloorDivFP32Test

delegate/test/ElementwiseBinaryTest.cpp:331–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331void FloorDivFP32Test()
332{
333 std::vector<int32_t> input0Shape { 2, 2, 2, 2 };
334 std::vector<int32_t> input1Shape { 2, 2, 2, 2 };
335 std::vector<int32_t> expectedOutputShape { 2, 2, 2, 2 };
336
337 std::vector<float> input0Values =
338 {
339 -37.5f, -15.2f, -8.76f, -2.0f, -2.6f, -1.0f, -0.8f, 0.0f,
340 4.0f, 1.6f, 2.0f, 5.2f, 6.0f, 35.04f, 60.8f, 150.0f
341 };
342
343 std::vector<float> input1Values =
344 {
345 1.f, 1.f, 1.f, 1.f, 2.f, 2.f, 2.f, 2.f,
346 4.f, 4.f, 4.f, 4.f, 4.f, 4.f, 4.f, 4.f
347 };
348
349 std::vector<float> expectedOutputValues =
350 {
351 -38.0f, -16.0f, -9.0f, -2.0f, -2.0f, -1.0f, -1.0f, 0.0f,
352 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 8.0f, 15.0f, 37.0f
353 };
354
355 ElementwiseBinaryTest<float>(tflite::BuiltinOperator_FLOOR_DIV,
356 tflite::ActivationFunctionType_NONE,
357 ::tflite::TensorType_FLOAT32,
358 input0Shape,
359 input1Shape,
360 expectedOutputShape,
361 input0Values,
362 input1Values,
363 expectedOutputValues);
364
365}
366
367void FloorDivINT32Test()
368{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected