Lines Matching refs:mNnApi
94 std::unique_ptr<const NnApiSupportLibrary> mNnApi = member in android::nn::generated_tests::GeneratedTests
131 EXPECT_EQ(mNnApi->ANeuralNetworksModel_getSupportedOperationsForDevices( in checkSupported()
191 EXPECT_EQ(mNnApi->SL_ANeuralNetworksDevice_getNumberOfCacheFilesNeeded( in compileModel()
202 auto resultCompilation1 = Compilation::createForDevice(mNnApi.get(), &model, device); in compileModel()
215 auto resultCompilation2 = Compilation::createForDevice(mNnApi.get(), &model, device); in compileModel()
230 auto resultCompilation = Compilation::createForDevice(mNnApi.get(), &model, device); in compileModel()
257 EXPECT_EQ(mNnApi->ANeuralNetworksMemoryDesc_create(&desc), ANEURALNETWORKS_NO_ERROR); in createDeviceMemoryForInput()
258 EXPECT_EQ(mNnApi->ANeuralNetworksMemoryDesc_addInputRole(desc, compilation.getHandle(), index, in createDeviceMemoryForInput()
261 EXPECT_EQ(mNnApi->ANeuralNetworksMemoryDesc_finish(desc), ANEURALNETWORKS_NO_ERROR); in createDeviceMemoryForInput()
263 mNnApi->ANeuralNetworksMemory_createFromDesc(desc, &memory); in createDeviceMemoryForInput()
264 mNnApi->ANeuralNetworksMemoryDesc_free(desc); in createDeviceMemoryForInput()
271 EXPECT_EQ(mNnApi->ANeuralNetworksMemoryDesc_create(&desc), ANEURALNETWORKS_NO_ERROR); in createDeviceMemoryForOutput()
272 EXPECT_EQ(mNnApi->ANeuralNetworksMemoryDesc_addOutputRole(desc, compilation.getHandle(), index, in createDeviceMemoryForOutput()
275 EXPECT_EQ(mNnApi->ANeuralNetworksMemoryDesc_finish(desc), ANEURALNETWORKS_NO_ERROR); in createDeviceMemoryForOutput()
277 mNnApi->ANeuralNetworksMemory_createFromDesc(desc, &memory); in createDeviceMemoryForOutput()
278 mNnApi->ANeuralNetworksMemoryDesc_free(desc); in createDeviceMemoryForOutput()
308 auto& wrapperMemory = inputMemories.emplace_back(Memory(mNnApi.get(), memory)); in computeWithDeviceMemories()
311 auto ashmem = TestAshmem::createFrom(mNnApi.get(), operand.data); in computeWithDeviceMemories()
313 ASSERT_EQ(mNnApi->ANeuralNetworksMemory_copy(ashmem->get()->get(), memory), in computeWithDeviceMemories()
323 auto& wrapperMemory = outputMemories.emplace_back(Memory(mNnApi.get(), memory)); in computeWithDeviceMemories()
337 auto ashmem = TestAshmem::createFrom(mNnApi.get(), output); in computeWithDeviceMemories()
339 ASSERT_EQ(mNnApi->ANeuralNetworksMemory_copy(outputMemories[i].get(), ashmem->get()->get()), in computeWithDeviceMemories()
350 Execution execution(mNnApi.get(), &compilation); in executeWithCompilation()
391 mNnApi->ANeuralNetworks_getDeviceCount(&numDevices); in executeOnce()
395 mNnApi->ANeuralNetworks_getDevice(i, &device); in executeOnce()
397 mNnApi->ANeuralNetworksDevice_getName(device, &deviceName); in executeOnce()
438 mNnApi->ANeuralNetworks_getDeviceCount(&numDevices); in executeMultithreadedSharedCompilation()
442 mNnApi->ANeuralNetworks_getDevice(i, &device); in executeMultithreadedSharedCompilation()
444 mNnApi->ANeuralNetworksDevice_getName(device, &deviceName); in executeMultithreadedSharedCompilation()
475 GeneratedModel model(mNnApi.get()); in execute()
476 createModel(mNnApi.get(), testModel, mTestDynamicOutputShape, &model); in execute()
538 mNnApi.reset(nullptr); in TearDown()