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

Function CastInt32ToFp32Test

delegate/test/CastTest.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void CastInt32ToFp32Test(std::vector<armnn::BackendId>& backends)
38{
39 std::vector<int32_t> inputShape {1, 3, 2, 3};
40
41 std::vector<int32_t> inputValues { -1, -3, -1, -3, -1, -3, -1, -3, 1,
42 3, 1, 3, 1, 2, 1, 3, 1, 3 };
43
44 std::vector<float> expectedOutputValues { -1.0f, -3.0f, -1.0f, -3.0f, -1.0f, -3.0f, -1.0f, -3.0f, 1.0f,
45 3.0f, 1.0f, 3.0f, 1.0f, 2.0f, 1.0f, 3.0f, 1.0f, 3.0f };
46
47 CastTest<int32_t, float>(::tflite::TensorType_INT32,
48 ::tflite::TensorType_FLOAT32,
49 inputShape,
50 inputValues,
51 expectedOutputValues,
52 1.0f,
53 0,
54 backends);
55}
56
57// CAST Test Suite
58TEST_SUITE("CASTTests")

Callers 1

CastTest.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected