Lines Matching refs:EXPECT_EQ
68 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in addScalarOperand()
73 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in addOperand()
162 EXPECT_EQ(ANeuralNetworksModel_getExtensionOperandType(mModel, kTestExtensionName, in getExtensionOperandType()
255 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(size, PROT_READ | PROT_WRITE, fd, 0, &ashmem), in createAshmem()
317 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &operandType), ANEURALNETWORKS_NO_ERROR); in addScalarOperand()
327 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &operandType), ANEURALNETWORKS_NO_ERROR); in addTensorOperand()
397 EXPECT_EQ(ANeuralNetworksModel_create(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
403 EXPECT_EQ(ANeuralNetworksModel_addOperand(nullptr, &floatType), in TEST_F()
405 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
415 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &quant8TypeInvalidScale), in TEST_F()
426 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &quant8TypeInvalidZeroPoint), in TEST_F()
436 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &invalidScalarType), in TEST_F()
439 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &kInvalidTensorType1), in TEST_F()
441 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &kInvalidTensorType2), in TEST_F()
446 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_BAD_STATE); in TEST_F()
459 EXPECT_EQ(ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(nullptr, operandIndex, in TEST_F()
462 EXPECT_EQ( in TEST_F()
465 EXPECT_EQ(ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(mModel, operandIndex + 1, in TEST_F()
468 EXPECT_EQ(ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(mModel, operandIndex, in TEST_F()
490 EXPECT_EQ(ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(mModel, operandIndex, in TEST_F()
500 EXPECT_EQ( in TEST_F()
503 EXPECT_EQ( in TEST_F()
506 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex, &data, 0), in TEST_F()
508 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex + 1, &data, in TEST_F()
511 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex, &data, dataLength), in TEST_F()
518 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex, nullptr, 0), in TEST_F()
526 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex, &data, dataLength), in TEST_F()
539 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, operandIndex, buffer, sizeof(buffer)), in TEST_F()
551 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, operandIndex, buffer, sizeof(buffer)), in TEST_F()
570 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
572 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, nullptr, 0), in TEST_F()
579 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
582 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(nullptr, 0, buffer, sizeof(buffer)), in TEST_F()
584 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, nullptr, sizeof(buffer)), in TEST_F()
588 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, buffer, sizeof(buffer)), in TEST_F()
592 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, buffer, sizeof(float)), in TEST_F()
596 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 1, buffer, sizeof(float)), in TEST_F()
601 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, buffer, sizeof(float)), in TEST_F()
609 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
616 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(memorySize, PROT_READ | PROT_WRITE, memoryFd, 0, in TEST_F()
620 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(nullptr, 0, memory, 0, sizeof(float)), in TEST_F()
622 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, nullptr, 0, sizeof(float)), in TEST_F()
626 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, -1, memory, 0, sizeof(float)), in TEST_F()
630 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, 0, memorySize), in TEST_F()
634 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 1, memory, 0, sizeof(float)), in TEST_F()
638 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, memorySize + 1, in TEST_F()
643 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, memorySize - 3, in TEST_F()
649 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, 0, sizeof(float)), in TEST_F()
664 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &quant8Type), ANEURALNETWORKS_NO_ERROR); in TEST_F()
678 EXPECT_EQ(ANeuralNetworksMemory_createFromAHardwareBuffer(buffer, &memory), in TEST_F()
682 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, 0, sizeof(uint8_t)), in TEST_F()
694 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
709 EXPECT_EQ(ANeuralNetworksMemory_createFromAHardwareBuffer(buffer, &memory), in TEST_F()
713 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, memorySize + 1, in TEST_F()
718 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, memorySize - 3, in TEST_F()
751 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &modelType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
754 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, 0, valueModel), in TEST_F()
758 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(nullptr, 0, valueModel), in TEST_F()
760 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, 0, nullptr), in TEST_F()
764 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, -1, valueModel), in TEST_F()
768 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, 1, valueModel), in TEST_F()
773 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, 0, valueModel), in TEST_F()
782 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMScalarType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
784 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, buffer, sizeof(buffer)), in TEST_F()
791 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMTensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
792 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 1, buffer, kByteSizeOfOEMTensor), in TEST_F()
797 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMTensorType), ANEURALNETWORKS_BAD_STATE); in TEST_F()
803 EXPECT_EQ(ANeuralNetworksModel_addOperation(nullptr, ANEURALNETWORKS_AVERAGE_POOL_2D, 1, &input, in TEST_F()
806 EXPECT_EQ(ANeuralNetworksModel_addOperation(mModel, ANEURALNETWORKS_AVERAGE_POOL_2D, 0, nullptr, in TEST_F()
809 EXPECT_EQ(ANeuralNetworksModel_addOperation(mModel, ANEURALNETWORKS_AVERAGE_POOL_2D, 1, &input, in TEST_F()
814 EXPECT_EQ(addOperation(invalidOp, {input}, {output}), ANEURALNETWORKS_BAD_DATA); in TEST_F()
818 EXPECT_EQ(addOperation(ANEURALNETWORKS_AVERAGE_POOL_2D, {input}, {output}), in TEST_F()
825 EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(nullptr, 1, &input, 1, &output), in TEST_F()
827 EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(mModel, 0, nullptr, 1, &output), in TEST_F()
829 EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(mModel, 1, &input, 0, nullptr), in TEST_F()
834 EXPECT_EQ(identifyInputsAndOutputs({input}, {output}), ANEURALNETWORKS_BAD_STATE); in TEST_F()
838 EXPECT_EQ(ANeuralNetworksModel_relaxComputationFloat32toFloat16(nullptr, true), in TEST_F()
843 EXPECT_EQ(ANeuralNetworksModel_relaxComputationFloat32toFloat16(mModel, true), in TEST_F()
845 EXPECT_EQ(ANeuralNetworksModel_relaxComputationFloat32toFloat16(mModel, false), in TEST_F()
850 EXPECT_EQ(ANeuralNetworksModel_finish(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
852 EXPECT_EQ(modelFinish(), ANEURALNETWORKS_BAD_STATE); in TEST_F()
857 EXPECT_EQ(modelFinish(), ANEURALNETWORKS_BAD_DATA); in TEST_F()
862 EXPECT_EQ(ANeuralNetworksCompilation_create(nullptr, &compilation), in TEST_F()
864 EXPECT_EQ(ANeuralNetworksCompilation_create(mModel, nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
865 EXPECT_EQ(ANeuralNetworksCompilation_create(mModel, &compilation), ANEURALNETWORKS_BAD_STATE); in TEST_F()
871 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in TEST_F()
875 EXPECT_EQ(ANeuralNetworks_getDevice(0, &device), ANEURALNETWORKS_NO_ERROR); in TEST_F()
877 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(nullptr, &device, 1, &compilation), in TEST_F()
879 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, &device, 1, nullptr), in TEST_F()
883 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, &device, 0, &compilation), in TEST_F()
888 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, invalidDevices, 2, in TEST_F()
893 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, invalidDevices, 2, in TEST_F()
899 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(nullptr, nullptr, 1, &compilation), in TEST_F()
901 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, nullptr, 1, nullptr), in TEST_F()
903 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, nullptr, 1, &compilation), in TEST_F()
910 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in TEST_F()
916 EXPECT_EQ(ANeuralNetworks_getDevice(0, &device), ANEURALNETWORKS_NO_ERROR); in TEST_F()
917 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(nullptr, &device, 1, in TEST_F()
920 EXPECT_EQ( in TEST_F()
925 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, &device, 0, in TEST_F()
931 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, invalidDevices, 2, in TEST_F()
936 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, invalidDevices, 2, in TEST_F()
941 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(nullptr, nullptr, 1, in TEST_F()
944 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, nullptr, 1, nullptr), in TEST_F()
946 EXPECT_EQ( in TEST_F()
1103 EXPECT_EQ(ANeuralNetworksCompilation_setPreference(nullptr, ANEURALNETWORKS_PREFER_LOW_POWER), in TEST_F()
1106 EXPECT_EQ(ANeuralNetworksCompilation_setPreference(mCompilation, 40), ANEURALNETWORKS_BAD_DATA); in TEST_F()
1112 EXPECT_EQ(ANeuralNetworksCompilation_setCaching(nullptr, "/data/local/tmp", token.data()), in TEST_F()
1114 EXPECT_EQ(ANeuralNetworksCompilation_setCaching(mCompilation, nullptr, token.data()), in TEST_F()
1116 EXPECT_EQ(ANeuralNetworksCompilation_setCaching(mCompilation, "/data/local/tmp", nullptr), in TEST_F()
1121 EXPECT_EQ(ANeuralNetworksCompilation_setPriority(nullptr, ANEURALNETWORKS_PRIORITY_DEFAULT), in TEST_F()
1133 EXPECT_EQ(ANeuralNetworksCompilation_setPriority(mCompilation, invalidPriority), in TEST_F()
1141 EXPECT_EQ(ANeuralNetworksCompilation_setTimeout(nullptr, kShortWaitInNanoseconds), in TEST_F()
1145 EXPECT_EQ(ANeuralNetworksCompilation_setTimeout(mCompilation, kShortWaitInNanoseconds), in TEST_F()
1154 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryAlignmentForInput(mCompilation, 0, in TEST_F()
1157 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput(mCompilation, 0, in TEST_F()
1160 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput(mCompilation, 0, in TEST_F()
1163 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryPaddingForOutput(mCompilation, 0, in TEST_F()
1167 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1170 EXPECT_EQ( in TEST_F()
1173 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryAlignmentForInput(mCompilation, 0, in TEST_F()
1176 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput(nullptr, 0, &result), in TEST_F()
1178 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput(mCompilation, 0, in TEST_F()
1181 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput(nullptr, 0, in TEST_F()
1184 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput(mCompilation, 0, in TEST_F()
1187 EXPECT_EQ( in TEST_F()
1190 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryPaddingForOutput(mCompilation, 0, in TEST_F()
1196 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryAlignmentForInput( in TEST_F()
1199 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput( in TEST_F()
1202 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput( in TEST_F()
1205 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryPaddingForOutput( in TEST_F()
1217 EXPECT_EQ(ANeuralNetworksExecution_create(nullptr, &execution), in TEST_F()
1219 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, nullptr), in TEST_F()
1221 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_BAD_STATE); in TEST_F()
1226 EXPECT_EQ(ANeuralNetworksCompilation_finish(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
1227 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1228 EXPECT_EQ(ANeuralNetworksCompilation_setPreference(mCompilation, in TEST_F()
1231 EXPECT_EQ( in TEST_F()
1234 EXPECT_EQ(ANeuralNetworksCompilation_setTimeout(mCompilation, kShortWaitInNanoseconds), in TEST_F()
1237 EXPECT_EQ(ANeuralNetworksCompilation_setCaching(mCompilation, "/data/local/tmp", token.data()), in TEST_F()
1239 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_BAD_STATE); in TEST_F()
1245 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(nullptr, kShortWaitInNanoseconds), in TEST_F()
1253 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(execution, kShortWaitInNanoseconds), in TEST_F()
1265 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, false), in TEST_F()
1267 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, true), ANEURALNETWORKS_BAD_DATA); in TEST_F()
1315 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(memorySize, PROT_READ | PROT_WRITE, in TEST_F()
1549 EXPECT_EQ(ANeuralNetworksExecution_setLoopTimeout(nullptr, kShortWaitInNanoseconds), in TEST_F()
1555 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(nullptr, true), in TEST_F()
1557 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(nullptr, false), in TEST_F()
1566 EXPECT_EQ(ANeuralNetworksExecution_setReusable(nullptr, true), in TEST_F()
1568 EXPECT_EQ(ANeuralNetworksExecution_setReusable(nullptr, false), in TEST_F()
1577 EXPECT_EQ(ANeuralNetworksExecution_setInput(nullptr, 0, nullptr, buffer, sizeof(float)), in TEST_F()
1579 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, nullptr, nullptr, sizeof(float)), in TEST_F()
1583 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, nullptr, buffer, 20), in TEST_F()
1587 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 999, nullptr, buffer, sizeof(float)), in TEST_F()
1591 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, -1, nullptr, buffer, sizeof(float)), in TEST_F()
1595 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, &kInvalidTensorType1, buffer, in TEST_F()
1598 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, &kInvalidTensorType2, buffer, in TEST_F()
1603 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, nullptr, buffer, 8), in TEST_F()
1605 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, nullptr, buffer, 8), in TEST_F()
1611 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(mExecution, true), in TEST_F()
1616 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, nullptr, buffer, in TEST_F()
1626 EXPECT_EQ(ANeuralNetworksExecution_setOutput(nullptr, 0, nullptr, buffer, sizeof(float)), in TEST_F()
1628 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, 0, nullptr, nullptr, sizeof(float)), in TEST_F()
1632 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, 0, nullptr, buffer, 20), in TEST_F()
1636 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, 999, nullptr, buffer, sizeof(float)), in TEST_F()
1640 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, -1, nullptr, buffer, sizeof(float)), in TEST_F()
1644 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, 0, &kInvalidTensorType1, buffer, in TEST_F()
1647 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, 0, &kInvalidTensorType2, buffer, in TEST_F()
1652 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, 0, nullptr, buffer, 8), in TEST_F()
1654 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, 0, nullptr, buffer, 8), in TEST_F()
1660 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(mExecution, true), in TEST_F()
1665 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, 0, nullptr, buffer, in TEST_F()
1679 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(memorySize, PROT_READ | PROT_WRITE, memoryFd, 0, in TEST_F()
1683 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(nullptr, 0, nullptr, memory, 0, in TEST_F()
1686 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, nullptr, 0, in TEST_F()
1691 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 999, nullptr, memory, 0, in TEST_F()
1696 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, -1, nullptr, memory, 0, in TEST_F()
1701 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, 0, in TEST_F()
1706 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, in TEST_F()
1711 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, in TEST_F()
1716 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, &kInvalidTensorType1, in TEST_F()
1719 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, &kInvalidTensorType2, in TEST_F()
1724 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, 0, 8), in TEST_F()
1726 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, 0, 8), in TEST_F()
1729 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, nullptr, buffer, 8), in TEST_F()
1744 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(memorySize, PROT_READ | PROT_WRITE, memoryFd, in TEST_F()
1748 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(mExecution, true), in TEST_F()
1752 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, 0, in TEST_F()
1779 EXPECT_EQ(ANeuralNetworksMemory_createFromAHardwareBuffer(buffer, &memory), in TEST_F()
1783 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, 0, in TEST_F()
1788 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, in TEST_F()
1792 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, in TEST_F()
1797 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, &kInvalidTensorType1, in TEST_F()
1800 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, &kInvalidTensorType2, in TEST_F()
1826 EXPECT_EQ(ANeuralNetworksMemory_createFromAHardwareBuffer(buffer, &memory), in TEST_F()
1829 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(mExecution, true), in TEST_F()
1833 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, 0, in TEST_F()
1847 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1854 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(memorySize, PROT_READ | PROT_WRITE, memoryFd, 0, in TEST_F()
1858 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(nullptr, 0, nullptr, memory, 0, in TEST_F()
1861 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, nullptr, 0, in TEST_F()
1866 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 999, nullptr, memory, 0, in TEST_F()
1871 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, -1, nullptr, memory, 0, in TEST_F()
1876 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, in TEST_F()
1881 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, in TEST_F()
1886 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, in TEST_F()
1891 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, &kInvalidTensorType1, in TEST_F()
1894 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, &kInvalidTensorType2, in TEST_F()
1899 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, 8), in TEST_F()
1901 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, 8), in TEST_F()
1904 EXPECT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, buffer, 8), in TEST_F()
1916 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), in TEST_F()
1924 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(memorySize, PROT_READ | PROT_WRITE, memoryFd, in TEST_F()
1928 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(mExecution, true), in TEST_F()
1932 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, in TEST_F()
1960 EXPECT_EQ(ANeuralNetworksMemory_createFromAHardwareBuffer(buffer, &memory), in TEST_F()
1964 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecution, 0, nullptr, memory, 0, in TEST_F()
1969 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecution, 0, nullptr, memory, in TEST_F()
1974 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecution, 0, nullptr, memory, in TEST_F()
1979 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecution, 0, &kInvalidTensorType1, in TEST_F()
1982 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecution, 0, &kInvalidTensorType2, in TEST_F()
2008 EXPECT_EQ(ANeuralNetworksMemory_createFromAHardwareBuffer(buffer, &memory), in TEST_F()
2011 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(mExecution, true), in TEST_F()
2015 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecution, 0, nullptr, memory, 0, in TEST_F()
2036 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(memorySize, PROT_READ | PROT_WRITE, memoryFd, in TEST_F()
2041 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), in TEST_F()
2043 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, buffer, 8), in TEST_F()
2045 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(execution, true), in TEST_F()
2050 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), in TEST_F()
2052 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(execution, 0, nullptr, memory, 0, 8), in TEST_F()
2054 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(execution, true), in TEST_F()
2059 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), in TEST_F()
2061 EXPECT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, buffer, 8), in TEST_F()
2063 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(execution, true), in TEST_F()
2068 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), in TEST_F()
2070 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, 8), in TEST_F()
2072 EXPECT_EQ(ANeuralNetworksExecution_enableInputAndOutputPadding(execution, true), in TEST_F()
2087 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, mCompilation, 0, 1.0f), in TEST_F()
2091 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(desc, mInitCompilation, 0, 1.0f), in TEST_F()
2093 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(desc, mDeinitCompilation, 0, 1.0f), in TEST_F()
2096 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2099 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(desc, &memory), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2131 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, 1, 0), in TEST_F()
2133 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, 0, in TEST_F()
2138 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecution, 0, nullptr, memory, 0, 0), in TEST_F()
2153 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(desc, mCompilation, 0, 1.0f), in TEST_F()
2155 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2158 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(desc, &memory), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2162 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecution, 0, nullptr, memory, 1, 0), in TEST_F()
2164 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecution, 0, nullptr, memory, 0, in TEST_F()
2169 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecution, 0, nullptr, memory, 0, 0), in TEST_F()
2185 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, mCompilationDynamic, 0, 1.0f), in TEST_F()
2187 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(desc, 1, &dimension), in TEST_F()
2191 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(desc, mInitCompilation, 0, 1.0f), in TEST_F()
2194 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2197 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(desc, &memory), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2204 EXPECT_EQ(ANeuralNetworksExecution_setInputFromMemory(mExecutionDynamic, 0, &badType, memory, 0, in TEST_F()
2221 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(desc, mCompilationDynamic, 0, 1.0f), in TEST_F()
2223 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(desc, 1, &dimension), in TEST_F()
2225 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2228 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(desc, &memory), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2232 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(mExecutionDynamic, 0, &badType, memory, in TEST_F()
2240 EXPECT_EQ(ANeuralNetworksExecution_compute(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
2245 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2248 EXPECT_EQ(ANeuralNetworksExecution_startCompute(nullptr, &event), in TEST_F()
2250 EXPECT_EQ(ANeuralNetworksExecution_startCompute(execution, nullptr), in TEST_F()
2258 EXPECT_EQ(ANeuralNetworksEvent_wait(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
2263 EXPECT_EQ(ANeuralNetworksEvent_createFromSyncFenceFd(-1, &event), ANEURALNETWORKS_BAD_DATA); in TEST_F()
2264 EXPECT_EQ(ANeuralNetworksEvent_createFromSyncFenceFd(1, nullptr), in TEST_F()
2270 EXPECT_EQ(ANeuralNetworksEvent_getSyncFenceFd(nullptr, &syncFd), in TEST_F()
2272 EXPECT_EQ(syncFd, -1); in TEST_F()
2278 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2281 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, input0, sizeof(input0)), in TEST_F()
2283 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, input1, sizeof(input1)), in TEST_F()
2285 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, input2, sizeof(input2)), in TEST_F()
2287 EXPECT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, output0, sizeof(output0)), in TEST_F()
2290 EXPECT_EQ(ANeuralNetworksExecution_startCompute(execution, &event), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2294 EXPECT_EQ(ANeuralNetworksEvent_getSyncFenceFd(event, &syncFd), ANEURALNETWORKS_BAD_DATA); in TEST_F()
2295 EXPECT_EQ(syncFd, -1); in TEST_F()
2304 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution1), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2307 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution1, 0, nullptr, input0, sizeof(input0)), in TEST_F()
2309 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution1, 1, nullptr, input1, sizeof(input1)), in TEST_F()
2311 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution1, 2, nullptr, input2, sizeof(input2)), in TEST_F()
2313 EXPECT_EQ(ANeuralNetworksExecution_setOutput(execution1, 0, nullptr, output0, sizeof(output0)), in TEST_F()
2316 EXPECT_EQ(ANeuralNetworksExecution_startComputeWithDependencies(execution1, nullptr, 0, 0, in TEST_F()
2320 EXPECT_EQ(ANeuralNetworksEvent_getSyncFenceFd(event1, nullptr), in TEST_F()
2331 EXPECT_EQ(getSyncFdResult, ANEURALNETWORKS_BAD_DATA); in TEST_F()
2332 EXPECT_EQ(syncFd, -1); in TEST_F()
2338 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution2), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2339 EXPECT_EQ( in TEST_F()
2342 EXPECT_EQ(ANeuralNetworksExecution_startComputeWithDependencies(execution2, nullptr, 1, 0, in TEST_F()
2345 EXPECT_EQ(ANeuralNetworksExecution_startComputeWithDependencies(execution2, &event1, 1, 0, in TEST_F()
2349 EXPECT_EQ(ANeuralNetworksExecution_startComputeWithDependencies(execution2, wait_for_list, 2, 0, in TEST_F()
2360 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2364 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, input0, sizeof(input0)), in TEST_F()
2366 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, input1, sizeof(input1)), in TEST_F()
2368 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, input2, sizeof(input2)), in TEST_F()
2370 EXPECT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, output0, sizeof(output0)), in TEST_F()
2375 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, 0, &rank), in TEST_F()
2377 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, 0, dims), in TEST_F()
2381 EXPECT_EQ(ANeuralNetworksExecution_startCompute(execution, &event), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2382 EXPECT_EQ(ANeuralNetworksEvent_wait(event), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2385 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(nullptr, 0, &rank), in TEST_F()
2387 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(nullptr, 0, dims), in TEST_F()
2389 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, 0, nullptr), in TEST_F()
2391 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, 0, nullptr), in TEST_F()
2395 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, -1, &rank), in TEST_F()
2397 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, 999, &rank), in TEST_F()
2399 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, -1, dims), in TEST_F()
2401 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, 999, dims), in TEST_F()
2404 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandRank(execution, 0, &rank), in TEST_F()
2406 EXPECT_EQ(ANeuralNetworksExecution_getOutputOperandDimensions(execution, 0, dims), in TEST_F()
2408 EXPECT_EQ(rank, expectedRank); in TEST_F()
2409 EXPECT_EQ(dims[0], expectedDims); in TEST_F()
2444 EXPECT_EQ( in TEST_F()
2447 EXPECT_EQ( in TEST_F()
2496 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, &inputType, inputData.data(), in TEST_F()
2499 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 1, &inputType, inputData.data(), in TEST_F()
2502 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 2, &biasType, inputData.data(), in TEST_F()
2505 EXPECT_EQ(ANeuralNetworksExecution_setOutput(mExecution, 0, nullptr, outputData.data(), in TEST_F()
2514 EXPECT_EQ(ANeuralNetworksExecution_burstCompute(mExecution, nullptr), in TEST_F()
2516 EXPECT_EQ(ANeuralNetworksExecution_burstCompute(nullptr, mBurst), in TEST_F()
2526 EXPECT_EQ(ANeuralNetworksBurst_create(compilation, &burst), ANEURALNETWORKS_BAD_STATE); in TEST_F()
2540 EXPECT_EQ(ANeuralNetworksExecution_create(secondCompilation, &execution), in TEST_F()
2543 EXPECT_EQ(ANeuralNetworksExecution_burstCompute(execution, mBurst), ANEURALNETWORKS_BAD_DATA); in TEST_F()
2551 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &secondExecution), in TEST_F()
2557 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 0, nullptr, inputA0, sizeof(inputA0)), in TEST_F()
2559 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 1, nullptr, inputA1, sizeof(inputA1)), in TEST_F()
2561 EXPECT_EQ(ANeuralNetworksExecution_setInput(mExecution, 2, nullptr, inputA2, sizeof(inputA2)), in TEST_F()
2563 EXPECT_EQ( in TEST_F()
2570 EXPECT_EQ(ANeuralNetworksExecution_setInput(secondExecution, 0, nullptr, inputB0, in TEST_F()
2573 EXPECT_EQ(ANeuralNetworksExecution_setInput(secondExecution, 1, nullptr, inputB1, in TEST_F()
2576 EXPECT_EQ(ANeuralNetworksExecution_setInput(secondExecution, 2, nullptr, inputB2, in TEST_F()
2579 EXPECT_EQ(ANeuralNetworksExecution_setOutput(secondExecution, 0, nullptr, outputB0, in TEST_F()
2617 EXPECT_EQ(ANeuralNetworksBurst_create(mCompilation, &burst), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2628 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(memorySize, PROT_READ | PROT_WRITE, memoryFd, 0, in TEST_F()
2634 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2635 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, input0, sizeof(input0)), in TEST_F()
2637 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, input1, sizeof(input1)), in TEST_F()
2639 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, input2, sizeof(input2)), in TEST_F()
2641 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, in TEST_F()
2646 EXPECT_EQ(ANeuralNetworksExecution_burstCompute(execution, burst), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2659 EXPECT_EQ(ANeuralNetworksBurst_create(mCompilation, &burst), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2669 EXPECT_EQ(ANeuralNetworksMemory_createFromFd(memorySize, PROT_READ | PROT_WRITE, memoryFd, 0, in TEST_F()
2675 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2676 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, input0, sizeof(input0)), in TEST_F()
2678 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 1, nullptr, input1, sizeof(input1)), in TEST_F()
2680 EXPECT_EQ(ANeuralNetworksExecution_setInput(execution, 2, nullptr, input2, sizeof(input2)), in TEST_F()
2682 EXPECT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, in TEST_F()
2687 EXPECT_EQ(ANeuralNetworksExecution_burstCompute(execution, burst), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2700 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in TEST()
2701 EXPECT_EQ(ANeuralNetworks_getDeviceCount(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST()
2706 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in TEST()
2711 EXPECT_EQ(ANeuralNetworks_getDevice(i, &device), ANEURALNETWORKS_NO_ERROR); in TEST()
2714 EXPECT_EQ(ANeuralNetworks_getDevice(0, nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST()
2715 EXPECT_EQ(ANeuralNetworks_getDevice(numDevices, &device), ANEURALNETWORKS_BAD_DATA); in TEST()
2720 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in deviceStringCheck()
2726 EXPECT_EQ(ANeuralNetworks_getDevice(i, &device), ANEURALNETWORKS_NO_ERROR); in deviceStringCheck()
2727 EXPECT_EQ(func(device, &buffer), ANEURALNETWORKS_NO_ERROR); in deviceStringCheck()
2728 EXPECT_EQ(func(device, nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in deviceStringCheck()
2730 EXPECT_EQ(func(nullptr, &buffer), ANEURALNETWORKS_UNEXPECTED_NULL); in deviceStringCheck()
2731 EXPECT_EQ(func(nullptr, nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in deviceStringCheck()
2740 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in TEST()
2745 EXPECT_EQ(ANeuralNetworks_getDevice(i, &device), ANEURALNETWORKS_NO_ERROR); in TEST()
2747 EXPECT_EQ(ANeuralNetworksDevice_getName(device, &buffer), ANEURALNETWORKS_NO_ERROR); in TEST()
2749 EXPECT_EQ(deviceNames.count(name), (uint32_t)0); in TEST()
2760 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in TEST()
2766 EXPECT_EQ(ANeuralNetworks_getDevice(i, &device), ANEURALNETWORKS_NO_ERROR); in TEST()
2767 EXPECT_EQ(ANeuralNetworksDevice_getFeatureLevel(device, &featureLevel), in TEST()
2769 EXPECT_EQ(ANeuralNetworksDevice_getFeatureLevel(device, nullptr), in TEST()
2772 EXPECT_EQ(ANeuralNetworksDevice_getFeatureLevel(nullptr, &featureLevel), in TEST()
2774 EXPECT_EQ(ANeuralNetworksDevice_getFeatureLevel(nullptr, nullptr), in TEST()
2780 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in TEST()
2791 EXPECT_EQ(ANeuralNetworks_getDevice(i, &device), ANEURALNETWORKS_NO_ERROR); in TEST()
2792 EXPECT_EQ(ANeuralNetworksDevice_getType(device, &deviceType), ANEURALNETWORKS_NO_ERROR); in TEST()
2795 EXPECT_EQ(ANeuralNetworksDevice_getType(device, nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST()
2797 EXPECT_EQ(ANeuralNetworksDevice_getType(nullptr, &deviceType), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST()
2798 EXPECT_EQ(ANeuralNetworksDevice_getType(nullptr, nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST()
2803 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in TEST()
2808 EXPECT_EQ(ANeuralNetworks_getDevice(i, &device), ANEURALNETWORKS_NO_ERROR); in TEST()
2809 EXPECT_EQ(ANeuralNetworksDevice_wait(device), ANEURALNETWORKS_NO_ERROR); in TEST()
2811 EXPECT_EQ(ANeuralNetworksDevice_wait(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST()
2821 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in SetUp()
2824 EXPECT_EQ(ANeuralNetworks_getDevice(0, &mDevice), ANEURALNETWORKS_NO_ERROR); in SetUp()
2827 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, &mDevice, 1, in SetUp()
2849 EXPECT_EQ(ANeuralNetworksCompilation_setPreference(nullptr, ANEURALNETWORKS_PREFER_LOW_POWER), in TEST_F()
2854 EXPECT_EQ(ANeuralNetworksCompilation_setPreference(mCompilation, 40), ANEURALNETWORKS_BAD_DATA); in TEST_F()
2860 EXPECT_EQ(ANeuralNetworksCompilation_setCaching(nullptr, "/data/local/tmp", token.data()), in TEST_F()
2865 EXPECT_EQ(ANeuralNetworksCompilation_setCaching(mCompilation, nullptr, token.data()), in TEST_F()
2867 EXPECT_EQ(ANeuralNetworksCompilation_setCaching(mCompilation, "/data/local/tmp", nullptr), in TEST_F()
2874 EXPECT_EQ(ANeuralNetworksExecution_create(nullptr, &execution), in TEST_F()
2879 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, nullptr), in TEST_F()
2881 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_BAD_STATE); in TEST_F()
2886 EXPECT_EQ(ANeuralNetworksCompilation_finish(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
2890 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2891 EXPECT_EQ(ANeuralNetworksCompilation_setPreference(mCompilation, in TEST_F()
2894 EXPECT_EQ( in TEST_F()
2897 EXPECT_EQ(ANeuralNetworksCompilation_setTimeout(mCompilation, kShortWaitInNanoseconds), in TEST_F()
2900 EXPECT_EQ(ANeuralNetworksCompilation_setCaching(mCompilation, "/data/local/tmp", token.data()), in TEST_F()
2902 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_BAD_STATE); in TEST_F()
2912 EXPECT_EQ(ANeuralNetworksCompilation_setTimeout(mCompilation, kShortWaitInNanoseconds), in TEST_F()
2927 EXPECT_EQ(ANeuralNetworksCompilation_setTimeout(mCompilation, duration), in TEST_F()
2929 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2939 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in SetUp()
2942 EXPECT_EQ(ANeuralNetworks_getDevice(0, &mDevices[0]), ANEURALNETWORKS_NO_ERROR); in SetUp()
2943 EXPECT_EQ(ANeuralNetworks_getDevice(1, &mDevices[1]), ANEURALNETWORKS_NO_ERROR); in SetUp()
2946 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, mDevices, 2, in SetUp()
2969 EXPECT_EQ(ANeuralNetworksCompilation_setTimeout(nullptr, kShortWaitInNanoseconds), in TEST_F()
2976 EXPECT_EQ(ANeuralNetworksCompilation_setTimeout(mCompilation, kShortWaitInNanoseconds), in TEST_F()
2983 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(nullptr, kShortWaitInNanoseconds), in TEST_F()
2994 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(execution, kShortWaitInNanoseconds), in TEST_F()
3009 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, false), in TEST_F()
3011 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, true), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3027 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMTensorType), in SetUp()
3029 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMTensorType), in SetUp()
3037 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in SetUp()
3040 EXPECT_EQ(ANeuralNetworks_getDevice(i, &device), ANEURALNETWORKS_NO_ERROR); in SetUp()
3042 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, &device, 1, in SetUp()
3072 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryAlignmentForInput( in TEST_F()
3075 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput(mInvalidCompilation, in TEST_F()
3078 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput( in TEST_F()
3081 EXPECT_EQ(ANeuralNetworksCompilation_getPreferredMemoryPaddingForOutput(mInvalidCompilation, in TEST_F()
3094 EXPECT_EQ(ANeuralNetworksExecution_create(mInvalidCompilation, &execution), in TEST_F()
3105 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, mInvalidCompilation, 0, 1.0f), in TEST_F()
3107 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(desc, mInvalidCompilation, 0, 1.0f), in TEST_F()
3130 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(nullptr, false), in TEST_F()
3132 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(nullptr, true), in TEST_F()
3134 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, false), in TEST_F()
3136 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, true), in TEST_F()
3152 EXPECT_EQ(ANeuralNetworksExecution_getDuration( in TEST_F()
3155 EXPECT_EQ(ANeuralNetworksExecution_getDuration( in TEST_F()
3161 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(execution, kShortWaitInNanoseconds), in TEST_F()
3167 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, false), in TEST_F()
3169 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, true), in TEST_F()
3241 EXPECT_EQ(ANeuralNetworksExecution_getDuration(e, durationCode, durationPtr), in TEST_F()
3311 EXPECT_EQ(ANeuralNetworksExecution_setTimeout(execution, timeoutDuration), in runExecutionSetTimeoutTest()
3322 EXPECT_EQ(n, ANEURALNETWORKS_NO_ERROR); in runExecutionSetTimeoutTest()
3332 EXPECT_EQ(ANeuralNetworksExecution_startCompute(execution, &event), in runExecutionSetTimeoutTest()
3352 EXPECT_EQ(ANeuralNetworksExecution_startComputeWithDependencies(execution, nullptr, in runExecutionSetTimeoutTest()
3376 EXPECT_EQ(ANeuralNetworksMemoryDesc_create(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
3380 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(nullptr, mCompilation, 0, 1.0f), in TEST_F()
3382 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, nullptr, 0, 1.0f), in TEST_F()
3386 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3392 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 999, 1.0f), in TEST_F()
3396 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 0, 10.0f), in TEST_F()
3398 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 0, 0.0f), in TEST_F()
3400 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 0, -1.0f), in TEST_F()
3404 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3406 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3410 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(mDesc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3411 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3416 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(nullptr, mCompilation, 0, 1.0f), in TEST_F()
3418 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(mDesc, nullptr, 0, 1.0f), in TEST_F()
3422 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3428 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(mDesc, mCompilation, 999, 1.0f), in TEST_F()
3432 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(mDesc, mCompilation, 0, 10.0f), in TEST_F()
3434 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(mDesc, mCompilation, 0, 0.0f), in TEST_F()
3436 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(mDesc, mCompilation, 0, -1.0f), in TEST_F()
3440 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3442 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3446 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(mDesc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3447 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3460 EXPECT_EQ(ANeuralNetworksModel_create(&model), ANEURALNETWORKS_NO_ERROR); in createAndCompileAddModelWithType()
3461 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &type), ANEURALNETWORKS_NO_ERROR); in createAndCompileAddModelWithType()
3462 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &type), ANEURALNETWORKS_NO_ERROR); in createAndCompileAddModelWithType()
3463 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &actType), ANEURALNETWORKS_NO_ERROR); in createAndCompileAddModelWithType()
3464 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &type), ANEURALNETWORKS_NO_ERROR); in createAndCompileAddModelWithType()
3468 EXPECT_EQ(ANeuralNetworksModel_addOperation(model, ANEURALNETWORKS_ADD, 3, inList, 1, outList), in createAndCompileAddModelWithType()
3470 EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(model, 3, inList, 1, outList), in createAndCompileAddModelWithType()
3472 EXPECT_EQ(ANeuralNetworksModel_finish(model), ANEURALNETWORKS_NO_ERROR); in createAndCompileAddModelWithType()
3475 EXPECT_EQ(ANeuralNetworksCompilation_create(model, &compilation), ANEURALNETWORKS_NO_ERROR); in createAndCompileAddModelWithType()
3476 EXPECT_EQ(ANeuralNetworksCompilation_finish(compilation), ANEURALNETWORKS_NO_ERROR); in createAndCompileAddModelWithType()
3485 EXPECT_EQ(ANeuralNetworksMemoryDesc_create(&desc), ANEURALNETWORKS_NO_ERROR); in testIncompatibleOperands()
3486 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, compilation, 0, 1.0f), in testIncompatibleOperands()
3488 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, badCompilation, 0, 1.0f), in testIncompatibleOperands()
3490 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(desc, badCompilation, 0, 1.0f), in testIncompatibleOperands()
3496 EXPECT_EQ(ANeuralNetworksMemoryDesc_create(&desc), ANEURALNETWORKS_NO_ERROR); in testIncompatibleOperands()
3497 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(desc, compilation, 0, 1.0f), in testIncompatibleOperands()
3499 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, badCompilation, 0, 1.0f), in testIncompatibleOperands()
3501 EXPECT_EQ(ANeuralNetworksMemoryDesc_addOutputRole(desc, badCompilation, 0, 1.0f), in testIncompatibleOperands()
3616 EXPECT_EQ(ANeuralNetworksModel_create(&model), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3617 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &inoutType), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3618 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &filterType), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3619 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &biasType), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3620 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &scalarType), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3621 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &scalarType), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3622 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &scalarType), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3623 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &scalarType), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3624 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &inoutType), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3632 EXPECT_EQ(ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(model, 1, &channelQuant), in createAndCompileChannelQuantConvModel()
3637 EXPECT_EQ(ANeuralNetworksModel_addOperation(model, ANEURALNETWORKS_CONV_2D, std::size(inList), in createAndCompileChannelQuantConvModel()
3640 EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(model, std::size(inList), inList, in createAndCompileChannelQuantConvModel()
3643 EXPECT_EQ(ANeuralNetworksModel_finish(model), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3646 EXPECT_EQ(ANeuralNetworksCompilation_create(model, &compilation), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3647 EXPECT_EQ(ANeuralNetworksCompilation_finish(compilation), ANEURALNETWORKS_NO_ERROR); in createAndCompileChannelQuantConvModel()
3657 EXPECT_EQ(ANeuralNetworksMemoryDesc_create(&desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3658 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, compilation1, 1, 1.0f), in TEST_F()
3660 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, compilation2, 1, 1.0f), in TEST_F()
3677 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(nullptr, rank, dimensions), in TEST_F()
3679 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(mDesc, rank, nullptr), in TEST_F()
3683 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(mDesc, rank, dimensions), in TEST_F()
3685 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(mDesc, rank, badDimensions), in TEST_F()
3687 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(mDesc, badRank, badRankDimensions), in TEST_F()
3691 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3692 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3694 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(mDesc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3695 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(mDesc, rank, dimensions), in TEST_F()
3704 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(mDesc, badRank, badDimensions), in TEST_F()
3708 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3709 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 2, 1.0f), in TEST_F()
3718 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3719 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 2, 1.0f), in TEST_F()
3723 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(mDesc, 0, nullptr), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3724 EXPECT_EQ(ANeuralNetworksMemoryDesc_setDimensions(mDesc, badRank, badDimensions), in TEST_F()
3729 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
3732 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(mDesc), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3735 EXPECT_EQ(ANeuralNetworksCompilation_finish(mCompilation), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3736 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(mDesc, mCompilation, 0, 1.0f), in TEST_F()
3738 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(mDesc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3739 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(mDesc), ANEURALNETWORKS_BAD_STATE); in TEST_F()
3744 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(nullptr, &memory), in TEST_F()
3746 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(mDesc, nullptr), in TEST_F()
3750 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(mDesc, &memory), ANEURALNETWORKS_BAD_STATE); in TEST_F()
3785 EXPECT_EQ(ANeuralNetworksMemoryDesc_create(&desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3786 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, goodCompilation, 0, 1.0f), in TEST_F()
3788 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3789 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(desc, &goodDeviceMemory1), in TEST_F()
3791 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(desc, &goodDeviceMemory2), in TEST_F()
3796 EXPECT_EQ(ANeuralNetworksMemoryDesc_create(&desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3797 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, badCompilation1, 0, 1.0f), in TEST_F()
3799 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3800 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(desc, &badDeviceMemory1), in TEST_F()
3805 EXPECT_EQ(ANeuralNetworksMemoryDesc_create(&desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3806 EXPECT_EQ(ANeuralNetworksMemoryDesc_addInputRole(desc, badCompilation2, 0, 1.0f), in TEST_F()
3808 EXPECT_EQ(ANeuralNetworksMemoryDesc_finish(desc), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3809 EXPECT_EQ(ANeuralNetworksMemory_createFromDesc(desc, &badDeviceMemory2), in TEST_F()
3813 EXPECT_EQ(ANeuralNetworksMemory_copy(nullptr, goodDeviceMemory1), in TEST_F()
3815 EXPECT_EQ(ANeuralNetworksMemory_copy(goodDeviceMemory1, nullptr), in TEST_F()
3820 EXPECT_EQ(ANeuralNetworksMemory_copy(goodAshmem, badAshmem1), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3821 EXPECT_EQ(ANeuralNetworksMemory_copy(goodAshmem, badAshmem2), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3822 EXPECT_EQ(ANeuralNetworksMemory_copy(badAshmem1, goodAshmem), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3823 EXPECT_EQ(ANeuralNetworksMemory_copy(badAshmem2, goodAshmem), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3827 EXPECT_EQ(ANeuralNetworksMemory_copy(badAshmem1, goodDeviceMemory1), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3828 EXPECT_EQ(ANeuralNetworksMemory_copy(badAshmem2, goodDeviceMemory1), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3832 EXPECT_EQ(ANeuralNetworksMemory_copy(goodDeviceMemory1, goodAshmem), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3834 EXPECT_EQ(ANeuralNetworksMemory_copy(goodAshmem, goodDeviceMemory1), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3835 EXPECT_EQ(ANeuralNetworksMemory_copy(goodDeviceMemory1, badAshmem1), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3837 EXPECT_EQ(ANeuralNetworksMemory_copy(badAshmem1, goodDeviceMemory1), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3838 EXPECT_EQ(ANeuralNetworksMemory_copy(goodDeviceMemory1, goodAshmem), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3840 EXPECT_EQ(ANeuralNetworksMemory_copy(goodAshmem, goodDeviceMemory1), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3841 EXPECT_EQ(ANeuralNetworksMemory_copy(goodDeviceMemory1, badAshmem2), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3845 EXPECT_EQ(ANeuralNetworksMemory_copy(goodDeviceMemory2, goodDeviceMemory1), in TEST_F()
3848 EXPECT_EQ(ANeuralNetworksMemory_copy(goodAshmem, badDeviceMemory1), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3849 EXPECT_EQ(ANeuralNetworksMemory_copy(badDeviceMemory1, goodDeviceMemory1), in TEST_F()
3852 EXPECT_EQ(ANeuralNetworksMemory_copy(goodAshmem, badDeviceMemory2), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3853 EXPECT_EQ(ANeuralNetworksMemory_copy(badDeviceMemory2, goodDeviceMemory1), in TEST_F()
3856 EXPECT_EQ(ANeuralNetworksMemory_copy(goodAshmem, goodDeviceMemory2), ANEURALNETWORKS_NO_ERROR); in TEST_F()
3857 EXPECT_EQ(ANeuralNetworksMemory_copy(badAshmem1, goodDeviceMemory2), ANEURALNETWORKS_BAD_DATA); in TEST_F()
3858 EXPECT_EQ(ANeuralNetworksMemory_copy(goodDeviceMemory2, goodDeviceMemory1), in TEST_F()
3876 EXPECT_EQ(ANeuralNetworksDevice_getExtensionSupport(nullptr, kTestExtensionName, &result), in TEST()
3880 EXPECT_EQ(ANeuralNetworks_getDeviceCount(&numDevices), ANEURALNETWORKS_NO_ERROR); in TEST()
3885 EXPECT_EQ(ANeuralNetworks_getDevice(i, &device), ANEURALNETWORKS_NO_ERROR); in TEST()
3886 EXPECT_EQ(ANeuralNetworksDevice_getExtensionSupport(device, kTestExtensionName, nullptr), in TEST()
3888 EXPECT_EQ(ANeuralNetworksDevice_getExtensionSupport(device, nullptr, &result), in TEST()
3890 EXPECT_EQ(ANeuralNetworksDevice_getExtensionSupport(device, kTestExtensionName, &result), in TEST()