Lines Matching refs:execution
351 ANeuralNetworksExecution* execution = nullptr; in executeWithMemoryAsInput() local
352 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), in executeWithMemoryAsInput()
354 ASSERT_EQ(ANeuralNetworksExecution_setInputFromMemory(execution, 0, nullptr, memory, 0, 0), in executeWithMemoryAsInput()
356 ASSERT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, &data, sizeof(float)), in executeWithMemoryAsInput()
358 ASSERT_EQ(ANeuralNetworksExecution_compute(execution), expectedResult); in executeWithMemoryAsInput()
359 ANeuralNetworksExecution_free(execution); in executeWithMemoryAsInput()
365 ANeuralNetworksExecution* execution = nullptr; in executeWithMemoryAsOutput() local
366 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), in executeWithMemoryAsOutput()
368 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, &data, sizeof(float)), in executeWithMemoryAsOutput()
370 ASSERT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, 0), in executeWithMemoryAsOutput()
372 ASSERT_EQ(ANeuralNetworksExecution_compute(execution), expectedResult); in executeWithMemoryAsOutput()
373 ANeuralNetworksExecution_free(execution); in executeWithMemoryAsOutput()
1145 ANeuralNetworksExecution* execution = nullptr; in TEST_F() local
1146 EXPECT_EQ(ANeuralNetworksExecution_create(nullptr, &execution), in TEST_F()
1150 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_BAD_STATE); in TEST_F()
1178 ANeuralNetworksExecution* execution; in TEST_F() local
1179 ASSERT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1182 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(execution, kShortWaitInNanoseconds), in TEST_F()
1184 ANeuralNetworksExecution_free(execution); in TEST_F()
1191 ANeuralNetworksExecution* execution; in TEST_F() local
1192 ASSERT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1194 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, false), in TEST_F()
1196 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, true), ANEURALNETWORKS_BAD_DATA); in TEST_F()
1199 ANeuralNetworksExecution_free(execution); in TEST_F()
1211 ANeuralNetworksExecution* execution; in TEST_F() local
1212 ASSERT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), in TEST_F()
1217 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, &in0, sizeof(in0)), in TEST_F()
1219 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, &in1, sizeof(in1)), in TEST_F()
1221 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, &in2, sizeof(in2)), in TEST_F()
1223 ASSERT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, &out0, sizeof(out0)), in TEST_F()
1234 auto testTooLate = [this, execution, &in0, &out0, memory] { in TEST_F()
1238 ASSERT_EQ(ANeuralNetworksExecution_setLoopTimeout(execution, kShortWaitInNanoseconds), in TEST_F()
1242 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, &in0, sizeof(in0)), in TEST_F()
1245 ANeuralNetworksExecution_setOutput(execution, 0, nullptr, &out0, sizeof(out0)), in TEST_F()
1247 ASSERT_EQ(ANeuralNetworksExecution_setInputFromMemory(execution, 0, nullptr, memory, 0, in TEST_F()
1250 ASSERT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, in TEST_F()
1257 ASSERT_EQ(ANeuralNetworksExecution_startCompute(execution, &event), in TEST_F()
1262 ASSERT_EQ(ANeuralNetworksExecution_compute(execution), ANEURALNETWORKS_BAD_STATE); in TEST_F()
1269 ASSERT_EQ(ANeuralNetworksExecution_burstCompute(execution, burst), in TEST_F()
1277 ASSERT_EQ(ANeuralNetworksExecution_startComputeWithDependencies(execution, nullptr, in TEST_F()
1287 ASSERT_EQ(ANeuralNetworksExecution_startCompute(execution, &event), in TEST_F()
1296 ASSERT_EQ(ANeuralNetworksExecution_compute(execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1304 ASSERT_EQ(ANeuralNetworksExecution_burstCompute(execution, burst), in TEST_F()
1312 ASSERT_EQ(ANeuralNetworksExecution_startComputeWithDependencies(execution, nullptr, in TEST_F()
1326 ANeuralNetworksExecution_free(execution); in TEST_F()
1515 ANeuralNetworksExecution* execution; in TEST_F() local
1516 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1530 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, nullptr, 0, in TEST_F()
1535 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 999, nullptr, memory, 0, in TEST_F()
1540 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, -1, nullptr, memory, 0, in TEST_F()
1545 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, in TEST_F()
1550 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, in TEST_F()
1555 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, in TEST_F()
1560 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, &kInvalidTensorType1, in TEST_F()
1563 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, &kInvalidTensorType2, in TEST_F()
1568 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, 8), in TEST_F()
1570 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, 8), in TEST_F()
1573 EXPECT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, buffer, 8), in TEST_F()
1578 ANeuralNetworksExecution_free(execution); in TEST_F()
1655 ANeuralNetworksExecution* execution = nullptr; in TEST_F() local
1656 ASSERT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), in TEST_F()
1658 ASSERT_EQ(ANeuralNetworksExecution_setInputFromMemory(execution, 0, nullptr, memory, 0, 0), in TEST_F()
1660 ASSERT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, &data, sizeof(float)), in TEST_F()
1667 ASSERT_EQ(ANeuralNetworksExecution_compute(execution), ANEURALNETWORKS_OP_FAILED); in TEST_F()
1668 ANeuralNetworksExecution_free(execution); in TEST_F()
1788 ANeuralNetworksExecution* execution; in TEST_F() local
1789 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1794 EXPECT_EQ(ANeuralNetworksExecution_startCompute(execution, nullptr), in TEST_F()
1798 ANeuralNetworksExecution_free(execution); in TEST_F()
1864 ANeuralNetworksExecution* execution; in TEST_F() local
1865 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1869 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, input0, sizeof(input0)), in TEST_F()
1871 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, input1, sizeof(input1)), in TEST_F()
1873 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, input2, sizeof(input2)), in TEST_F()
1875 EXPECT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, output0, sizeof(output0)), in TEST_F()
1880 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, 0, &rank), in TEST_F()
1882 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, 0, dims), in TEST_F()
1886 EXPECT_EQ(ANeuralNetworksExecution_startCompute(execution, &event), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1894 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, 0, nullptr), in TEST_F()
1896 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, 0, nullptr), in TEST_F()
1900 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, -1, &rank), in TEST_F()
1902 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, 999, &rank), in TEST_F()
1904 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, -1, dims), in TEST_F()
1906 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, 999, dims), in TEST_F()
1909 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, 0, &rank), in TEST_F()
1911 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, 0, dims), in TEST_F()
1918 ANeuralNetworksExecution_free(execution); in TEST_F()
2044 ANeuralNetworksExecution* execution; in TEST_F() local
2045 EXPECT_EQ(ANeuralNetworksExecution_create(secondCompilation, &execution), in TEST_F()
2048 EXPECT_EQ(ANeuralNetworksExecution_burstCompute(execution, mBurst), ANEURALNETWORKS_BAD_DATA); in TEST_F()
2050 ANeuralNetworksExecution_free(execution); in TEST_F()
2138 ANeuralNetworksExecution* execution; in TEST_F() local
2139 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2140 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, input0, sizeof(input0)), in TEST_F()
2142 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, input1, sizeof(input1)), in TEST_F()
2144 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, input2, sizeof(input2)), in TEST_F()
2146 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, in TEST_F()
2151 EXPECT_EQ(ANeuralNetworksExecution_burstCompute(execution, burst), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2152 ANeuralNetworksExecution_free(execution); in TEST_F()
2179 ANeuralNetworksExecution* execution; in TEST_F() local
2180 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2181 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, input0, sizeof(input0)), in TEST_F()
2183 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, input1, sizeof(input1)), in TEST_F()
2185 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, input2, sizeof(input2)), in TEST_F()
2187 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, in TEST_F()
2192 EXPECT_EQ(ANeuralNetworksExecution_burstCompute(execution, burst), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2193 ANeuralNetworksExecution_free(execution); in TEST_F()
2378 ANeuralNetworksExecution* execution = nullptr; in TEST_F() local
2379 EXPECT_EQ(ANeuralNetworksExecution_create(nullptr, &execution), in TEST_F()
2386 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_BAD_STATE); in TEST_F()
2495 ANeuralNetworksExecution* execution; in TEST_F() local
2496 ASSERT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2499 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(execution, kShortWaitInNanoseconds), in TEST_F()
2501 ANeuralNetworksExecution_free(execution); in TEST_F()
2511 ANeuralNetworksExecution* execution; in TEST_F() local
2512 ASSERT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2514 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, false), in TEST_F()
2516 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, true), ANEURALNETWORKS_BAD_DATA); in TEST_F()
2519 ANeuralNetworksExecution_free(execution); in TEST_F()
2575 ANeuralNetworksExecution* execution = nullptr; in TEST_F() local
2576 EXPECT_EQ(ANeuralNetworksExecution_create(mInvalidCompilation, &execution), in TEST_F()
2578 ANeuralNetworksExecution_free(execution); in TEST_F()
2608 ANeuralNetworksExecution* execution; in TEST_F() local
2609 ASSERT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), in TEST_F()
2616 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, false), in TEST_F()
2618 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, true), in TEST_F()
2623 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, &in0, sizeof(in0)), in TEST_F()
2625 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, &in1, sizeof(in1)), in TEST_F()
2627 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, &in2, sizeof(in2)), in TEST_F()
2629 ASSERT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, &out0, sizeof(out0)), in TEST_F()
2635 execution, ANEURALNETWORKS_DURATION_ON_HARDWARE, &duration), in TEST_F()
2638 execution, ANEURALNETWORKS_DURATION_IN_DRIVER, &duration), in TEST_F()
2641 auto testSetTimeoutTooLate = [execution] { in TEST_F()
2643 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(execution, kShortWaitInNanoseconds), in TEST_F()
2647 auto testMeasureTooLate = [execution] { in TEST_F()
2649 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, false), in TEST_F()
2651 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, true), in TEST_F()
2659 ASSERT_EQ(ANeuralNetworksExecution_startCompute(execution, &event), in TEST_F()
2669 ASSERT_EQ(ANeuralNetworksExecution_compute(execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2678 ASSERT_EQ(ANeuralNetworksExecution_burstCompute(execution, burst), in TEST_F()
2687 ASSERT_EQ(ANeuralNetworksExecution_startComputeWithDependencies(execution, nullptr, in TEST_F()
2730 std::vector<ANeuralNetworksExecution*> executions = {nullptr, execution}; in TEST_F()
2747 ANeuralNetworksExecution_free(execution); in TEST_F()
2775 ANeuralNetworksExecution* execution; in runExecutionSetTimeoutTest() local
2776 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), in runExecutionSetTimeoutTest()
2779 [execution] { ANeuralNetworksExecution_free(execution); }); in runExecutionSetTimeoutTest()
2783 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, &in0, sizeof(in0)), in runExecutionSetTimeoutTest()
2785 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, &in1, sizeof(in1)), in runExecutionSetTimeoutTest()
2787 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, &in2, sizeof(in2)), in runExecutionSetTimeoutTest()
2789 ASSERT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, &out0, sizeof(out0)), in runExecutionSetTimeoutTest()
2793 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(execution, timeoutDuration), in runExecutionSetTimeoutTest()
2814 EXPECT_EQ(ANeuralNetworksExecution_startCompute(execution, &event), in runExecutionSetTimeoutTest()
2821 checkResult(ANeuralNetworksExecution_compute(execution)); in runExecutionSetTimeoutTest()
2828 checkResult(ANeuralNetworksExecution_burstCompute(execution, burst)); in runExecutionSetTimeoutTest()
2834 EXPECT_EQ(ANeuralNetworksExecution_startComputeWithDependencies(execution, nullptr, in runExecutionSetTimeoutTest()