Home
last modified time | relevance | path

Searched refs:mModel (Results 1 – 25 of 60) sorted by relevance

123

/packages/modules/NeuralNetworks/runtime/test/
DTestWrapper.cpp29 mIn = mModel.addOperand(&type); in SetUp()
30 mOut = mModel.addOperand(&type); in SetUp()
31 mModel.addOperation(ANEURALNETWORKS_TANH, {mIn}, {mOut}); in SetUp()
34 Model mModel; member in WrapperTestModelFinish
39 ASSERT_TRUE(mModel.isValid()); in TEST_F()
40 mModel.identifyInputsAndOutputs({mIn}, {mOut}); in TEST_F()
41 ASSERT_TRUE(mModel.isValid()); in TEST_F()
42 ASSERT_EQ(mModel.finish(), Result::NO_ERROR); in TEST_F()
43 ASSERT_TRUE(mModel.isValid()); in TEST_F()
47 ASSERT_TRUE(mModel.isValid()); in TEST_F()
[all …]
DTestValidation.cpp58 ASSERT_EQ(ANeuralNetworksModel_create(&mModel), ANEURALNETWORKS_NO_ERROR); in SetUp()
61 ANeuralNetworksModel_free(mModel); in TearDown()
68 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in addScalarOperand()
73 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in addOperand()
93 return ANeuralNetworksModel_addOperation(mModel, type, inputs.size(), inputs.data(), in addOperation()
98 return ANeuralNetworksModel_identifyInputsAndOutputs(mModel, inputs.size(), inputs.data(), in identifyInputsAndOutputs()
101 int modelFinish() { return ANeuralNetworksModel_finish(mModel); } in modelFinish()
117 ANeuralNetworksModel* mModel = nullptr; member in __anona1c03bcd0111::ValidationTestModel
162 EXPECT_EQ(ANeuralNetworksModel_getExtensionOperandType(mModel, kTestExtensionName, in getExtensionOperandType()
180 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in SetUp()
[all …]
DTestNeuralNetworksWrapper.h105 ANeuralNetworksModel_create(&mModel); in Model()
107 ~Model() { ANeuralNetworksModel_free(mModel); } in ~Model()
121 ANeuralNetworksModel_free(mModel);
122 mModel = other.mModel;
127 other.mModel = nullptr;
138 auto result = static_cast<Result>(ANeuralNetworksModel_finish(mModel)); in finish()
150 if (ANeuralNetworksModel_addOperand(mModel, &(type->operandType)) != in addOperand()
156 mModel, mNextOperandId, &type->channelQuant.value().params) != in addOperand()
182 if (ANeuralNetworksModel_setOperandValue(mModel, index, buffer, length) != in setOperandValue()
196 if (ANeuralNetworksModel_setOperandValueFromMemory(mModel, index, memory->get(), offset, in setOperandValueFromMemory()
[all …]
DTestOperandExtraParams.cpp35 ASSERT_EQ(ANeuralNetworksModel_create(&mModel), ANEURALNETWORKS_NO_ERROR); in SetUp()
39 ANeuralNetworksModel_free(mModel); in TearDown()
120 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in testAddingWithSymmPerChannelQuantParams()
122 EXPECT_EQ(ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(mModel, operandIndex, in testAddingWithSymmPerChannelQuantParams()
127 ANeuralNetworksModel* mModel = nullptr; member in __anon81f4e3130111::OperandExtraParamsTest
242 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_BAD_DATA); in TEST_F()
250 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_BAD_DATA); in TEST_F()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sorting/
DSortModelTest.java75 private SortModel mModel; field in SortModelTest
79 mModel = new SortModel(Arrays.asList(DIMENSIONS)); in setUp()
80 mModel.addListener(STUB_LISTENER); in setUp()
85 assertEquals(DIMENSIONS.length, mModel.getSize()); in testSizeEquals()
91 assertSame(DIMENSIONS[i], mModel.getDimensionAt(i)); in testDimensionSame_getDimensionAt()
98 assertSame(dimension, mModel.getDimensionById(dimension.getId())); in testDimensionSame_getDimensionById()
106 mModel.setDimensionVisibility(DIMENSION_1.getId(), View.GONE); in testSetDimensionVisibility()
114 assertEquals(SortModel.SORT_DIMENSION_ID_UNKNOWN, mModel.getSortedDimensionId()); in testNotSortedByDefault()
119 mModel.setDefaultDimension(DIMENSION_1.getId()); in testSortByDefault()
125 assertSame(mModel, STUB_LISTENER.mLastSortModel); in testSortByDefault()
[all …]
/packages/modules/NeuralNetworks/runtime/test/fibonacci_extension/
DFibonacciExtensionTest.cpp99 mModel.getHandle(), devices.data(), devices.size(), supported), in checkSupportedOperations()
112 ASSERT_EQ(ANeuralNetworksCompilation_createForDevices(mModel.getHandle(), mDevices.data(), in prepareForExecution()
126 ExtensionModel mModel; member in android::nn::__anonce7830460111::FibonacciExtensionTest
178 ExtensionOperandType inputType(static_cast<Type>(mModel.getExtensionOperandType( in TEST_F()
182 static_cast<Type>(mModel.getExtensionOperandType(EXAMPLE_FIBONACCI_EXTENSION_NAME, in TEST_F()
189 createModel(&mModel, inputType, outputType, /*addNopOperations=*/false); in TEST_F()
220 createModel(&mModel, inputType, outputType, /*addNopOperations=*/true); in TEST_F()
249 createModel(&mModel, inputType, outputType, /*addNopOperations=*/false); in TEST_F()
251 ASSERT_EQ(ANeuralNetworksCompilation_createForDevices(mModel.getHandle(), mDevices.data(), in TEST_F()
260 createModel(&mModel, inputType, outputType, /*addNopOperations=*/false); in TEST_F()
[all …]
/packages/modules/NeuralNetworks/common/
DMetaModel.cpp95 : mModel(std::move(model)), in MetaModel()
96 mModelMinimumSupportedVersion(validate(mModel).value()), in MetaModel()
112 slice.mModel, Mapper([&slice](uint32_t slicedOperationIndex) { in getSlice()
246 const auto& origOperands = mModel.main.operands; in processOperations()
247 const auto& origOperations = mModel.main.operations; in processOperations()
248 auto& slicedOperands = slice->mModel.main.operands; in processOperations()
249 auto& slicedOperations = slice->mModel.main.operations; in processOperations()
329 extend(&slice->mModel.main.outputIndexes, slicedOperandIndex); in processOperations()
337 const auto [operandValuesSize, poolSizes] = getMemorySizes(mModel); in getNoncompliantOperations()
339 auto subgraphVersionCache = createSubgraphVersionCache(mModel.referenced.size()); in getNoncompliantOperations()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/adapter/
DMtpAdapter.java47 private MtpDeviceIndex mModel; field in MtpAdapter
59 mModel = index; in setMtpDeviceIndex()
64 return mModel; in getMtpDeviceIndex()
80 return (mModel != null) && mModel.isDeviceConnected(); in deviceConnected()
84 return (mModel != null) && mModel.isIndexReady(); in indexReady()
89 return mModel != null ? mModel.size() : 0; in getCount()
94 return mModel.get(position, mSortOrder); in getItem()
147 imageView.setMtpDeviceAndObjectInfo(mModel.getDevice(), in getView()
172 return mModel.getFirstPositionForBucketNumber(section, mSortOrder); in getPositionForSection()
184 return mModel.getBucketNumberForPosition(position, mSortOrder); in getSectionForPosition()
[all …]
DMtpPagerAdapter.java42 private MtpDeviceIndex mModel; field in MtpPagerAdapter
54 mModel = index; in setMtpDeviceIndex()
60 return mModel != null ? mModel.sizeWithoutLabels() : 0; in getCount()
70 if (mModel == null) { in translatePositionWithLabels()
73 return mModel.getPositionWithoutLabelsFromPosition(position, mSortOrder); in translatePositionWithLabels()
104 IngestObjectInfo i = mModel.getWithoutLabels(position, mSortOrder); in instantiateItem()
105 v.getImageView().setMtpDeviceAndObjectInfo(mModel.getDevice(), i, mGeneration); in instantiateItem()
/packages/apps/Car/Launcher/tests/src/com/android/car/carlauncher/homescreen/assistive/
DProjectionModelTest.java70 private ProjectionModel mModel; field in ProjectionModelTest
78 mModel = new ProjectionModel(); in setUp()
79 mModel.setPresenter(mPresenter); in setUp()
80 mModel.onCreate(mContext); in setUp()
86 mModel.onDestroy(mContext); in tearDown()
92 assertNull(mModel.getCardHeader()); in noChange_doesNotCallPresenter()
93 assertNull(mModel.getCardContent()); in noChange_doesNotCallPresenter()
100 verify(mPresenter).onModelUpdated(mModel); in changeProjectionStatusToProjectingDevice_callsPresenter()
101 DescriptiveTextView content = (DescriptiveTextView) mModel.getCardContent(); in changeProjectionStatusToProjectingDevice_callsPresenter()
109 verify(mPresenter).onModelUpdated(mModel); in changeProjectionStatusToNonProjectingDevice_callsPresenter()
[all …]
DAssistiveCardPresenterTest.java53 private HomeCardInterface.Model mModel; field in AssistiveCardPresenterTest
60 when(mModel.getCardHeader()).thenReturn(CARD_HEADER); in setUp()
61 when(mModel.getCardContent()).thenReturn(CARD_CONTENT); in setUp()
68 mPresenter.onModelUpdated(mModel); in onModelUpdated_updatesFragment()
73 verify(mModel).onClick(mFragmentView); in onModelUpdated_updatesFragment()
79 mPresenter.onModelUpdated(mModel); in onModelUpdated_nullDifferentModel_doesNotUpdate()
88 verify(mModel).onClick(mFragmentView); in onModelUpdated_nullDifferentModel_doesNotUpdate()
94 mPresenter.onModelUpdated(mModel); in onModelUpdated_nullSameModel_updatesFragment()
96 when(mModel.getCardHeader()).thenReturn(null); in onModelUpdated_nullSameModel_updatesFragment()
98 mPresenter.onModelUpdated(mModel); in onModelUpdated_nullSameModel_updatesFragment()
[all …]
/packages/apps/Car/Launcher/tests/src/com/android/car/carlauncher/homescreen/audio/
DHomeAudioCardPresenterTest.java55 private HomeCardInterface.Model mModel; field in HomeAudioCardPresenterTest
62 when(mModel.getCardHeader()).thenReturn(CARD_HEADER); in setUp()
63 when(mModel.getCardContent()).thenReturn(CARD_CONTENT); in setUp()
70 mPresenter.onModelUpdated(mModel); in onModelUpdated_updatesFragment()
75 verify(mModel).onClick(mFragmentView); in onModelUpdated_updatesFragment()
81 mPresenter.onModelUpdated(mModel); in onModelUpdated_nullDifferentModel_doesNotUpdate()
90 verify(mModel).onClick(mFragmentView); in onModelUpdated_nullDifferentModel_doesNotUpdate()
96 mPresenter.onModelUpdated(mModel); in onModelUpdated_nullSameModel_updatesFragment()
98 when(mModel.getCardHeader()).thenReturn(null); in onModelUpdated_nullSameModel_updatesFragment()
100 mPresenter.onModelUpdated(mModel); in onModelUpdated_nullSameModel_updatesFragment()
[all …]
/packages/apps/Car/Launcher/tests/src/com/android/car/carlauncher/homescreen/
DCardPresenterTest.java48 private HomeCardInterface.Model mModel; field in CardPresenterTest
78 when(mModel.getCardHeader()).thenReturn(CARD_HEADER); in onModelUpdated_validModel_updatesFragment()
79 when(mModel.getCardContent()).thenReturn(CARD_CONTENT); in onModelUpdated_validModel_updatesFragment()
81 mPresenter.onModelUpdated(mModel); in onModelUpdated_validModel_updatesFragment()
89 when(mModel.getCardHeader()).thenReturn(CARD_HEADER); in onModelUpdated_validHeaderNullContent_showsHeaderOnly()
90 when(mModel.getCardContent()).thenReturn(null); in onModelUpdated_validHeaderNullContent_showsHeaderOnly()
92 mPresenter.onModelUpdated(mModel); in onModelUpdated_validHeaderNullContent_showsHeaderOnly()
100 when(mModel.getCardHeader()).thenReturn(null); in onModelUpdated_nullHeaderValidContent_hidesFragment()
101 when(mModel.getCardContent()).thenReturn(CARD_CONTENT); in onModelUpdated_nullHeaderValidContent_hidesFragment()
103 mPresenter.onModelUpdated(mModel); in onModelUpdated_nullHeaderValidContent_hidesFragment()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DPhotoView.java197 private Model mModel; field in PhotoView
320 mModel = model; in setModel()
321 mTileView.setModel(mModel); in setModel()
367 if (mModel.isCamera(mNextBound) in handleMessage()
368 || mModel.isCamera(mPrevBound)) { in handleMessage()
421 if (Math.abs(mUndoIndexHint - mModel.getCurrentIndex()) >= 3) { in notifyDataChange()
437 mModel.isCamera(0), mSizes); in notifyDataChange()
606 mIsCamera = mModel.isCamera(0); in reload()
607 mIsPanorama = mModel.isPanorama(0); in reload()
608 mIsStaticCamera = mModel.isStaticCamera(0); in reload()
[all …]
/packages/modules/NeuralNetworks/shim_and_sl/include/
DSupportLibraryWrapper.h142 mValid = mNnApi->ANeuralNetworksModel_create(&mModel) == ANEURALNETWORKS_NO_ERROR; in Model()
145 if (mModel) { in ~Model()
146 mNnApi->ANeuralNetworksModel_free(mModel); in ~Model()
162 if (mModel != nullptr) {
163 mNnApi->ANeuralNetworksModel_free(mModel);
166 mModel = other.mModel;
174 other.mModel = nullptr;
185 auto result = static_cast<Result>(mNnApi->ANeuralNetworksModel_finish(mModel)); in finish()
197 if (mNnApi->ANeuralNetworksModel_addOperand(mModel, &type->operandType) != in addOperand()
206 mModel, mNextOperandId, &type->channelQuant.value().params) != in addOperand()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DLauncherAppState.java64 private final LauncherModel mModel; field in LauncherAppState
90 mContext.getSystemService(LauncherApps.class).registerCallback(mModel); in LauncherAppState()
93 new SimpleBroadcastReceiver(mModel::onBroadcastIntent); in LauncherAppState()
104 .setWidgetRefreshCallback(mModel::refreshAndBindWidgetsAndShortcuts); in LauncherAppState()
107 .addUserChangeListener(mModel::forceReload); in LauncherAppState()
123 InstallSessionHelper.INSTANCE.get(context).registerInstallTracker(mModel); in LauncherAppState()
143 mModel = new LauncherModel(context, this, mIconCache, new AppFilter(mContext)); in LauncherAppState()
159 mModel.forceReload(); in refreshAndReloadLauncher()
166 mModel.destroy(); in onTerminate()
167 mContext.getSystemService(LauncherApps.class).unregisterCallback(mModel); in onTerminate()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/
DDirectoryFragment.java151 private Model mModel; field in DirectoryFragment
374 mModel = mInjector.getModel(); in onCreateView()
375 mModel.reset(); in onCreateView()
423 mModel.removeUpdateListener(mModelUpdateListener); in onDestroyView()
424 mModel.removeUpdateListener(mAdapter.getModelUpdateListener()); in onDestroyView()
470 mModel.addUpdateListener(mAdapter.getModelUpdateListener()); in onActivityCreated()
471 mModel.addUpdateListener(mModelUpdateListener); in onActivityCreated()
474 new DocsSelectionPredicate(mInjector.config, mState, mModel, mRecView); in onActivityCreated()
476 mFocusManager = mInjector.getFocusManager(mRecView, mModel); in onActivityCreated()
483 mSelectionMetadata = new SelectionMetadata(mModel::getItem); in onActivityCreated()
[all …]
/packages/modules/NeuralNetworks/runtime/include/
DNeuralNetworksWrapper.h257 NNAPI_CALL(ANeuralNetworksModel_create(&mModel));
260 if (mModel) {
261 NNAPI_CALL(ANeuralNetworksModel_free(mModel));
277 if (mModel) {
278 NNAPI_CALL(ANeuralNetworksModel_free(mModel));
280 mModel = other.mModel;
283 other.mModel = nullptr;
292 auto result = static_cast<Result>(NNAPI_CALL(ANeuralNetworksModel_finish(mModel)));
303 if (NNAPI_CALL(ANeuralNetworksModel_addOperand(mModel, &(type->operandType))) !=
309 mModel, mNextOperandId, &type->channelQuant.value().params)) !=
[all …]
/packages/modules/NeuralNetworks/runtime/
DCompilationBuilder.cpp45 : mModel(model), in CompilationBuilder()
67 int n = mModel->partitionTheWork(mDevices, mPreference, mPriority, deadline, &mPlan, in finish()
85 if (mModel->hasOEMOperation()) { in finish()
89 if (mModel->hasExtensionOperation()) { in finish()
100 mPlan.becomeSingleStep(DeviceManager::getCpuDevice(), mModel); in finish()
258 if (index >= mModel->inputCount()) { in getPreferredMemoryAlignmentForInput()
280 if (index >= mModel->inputCount()) { in getPreferredMemoryPaddingForInput()
303 if (index >= mModel->outputCount()) { in getPreferredMemoryAlignmentForOutput()
326 if (index >= mModel->outputCount()) { in getPreferredMemoryPaddingForOutput()
381 if (index >= mModel->inputCount()) { in forEachStepRoleOfInput()
[all …]
DExecutionBuilder.cpp154 mModel(compilation->mModel), in ExecutionBuilder()
157 mInputs(mModel->inputCount()), in ExecutionBuilder()
158 mOutputs(mModel->outputCount()) { in ExecutionBuilder()
189 if (!checkDimensionInfo(mModel->getInputOperand(index), type, in setInput()
205 mModel->getInputOperand(index), type, const_cast<void*>(buffer), l, in setInput()
227 if (!checkDimensionInfo(mModel->getInputOperand(index), type, in setInputFromMemory()
253 ModelArgumentInfo::createFromMemory(mModel->getInputOperand(index), type, poolIndex, in setInputFromMemory()
271 if (!checkDimensionInfo(mModel->getOutputOperand(index), type, in setOutput()
287 mModel->getOutputOperand(index), type, buffer, l, mInputAndOutputPaddingEnabled); in setOutput()
308 if (!checkDimensionInfo(mModel->getOutputOperand(index), type, in setOutputFromMemory()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/sorting/
DTableHeaderController.java43 private final SortModel mModel; field in TableHeaderController
49 mModel = sortModel; in TableHeaderController()
58 onModelUpdate(mModel, SortModel.UPDATE_TYPE_UNSPECIFIED); in TableHeaderController()
60 mModel.addListener(mModelListener); in TableHeaderController()
78 mModel.removeListener(mModelListener); in destroy()
83 SortDimension dimension = mModel.getDimensionById(id); in bindCell()
99 mModel.sortByUser(dimension.getId(), dimension.getNextDirection()); in onCellClicked()
DSortListFragment.java36 private SortModel mModel; field in SortListFragment
60 mModel.sortByUser(item.id, item.direction); in onItemClicked()
66 for (int i = 0; i < mModel.getSize(); ++i) { in setupSortingList()
67 SortDimension dimension = mModel.getDimensionAt(i); in setupSortingList()
121 mModel = args.getParcelable(TAG_MODEL); in onCreateDialog()
123 mModel = savedInstanceState.getParcelable(TAG_MODEL); in onCreateDialog()
148 outState.putParcelable(TAG_MODEL, mModel); in onSaveInstanceState()
164 boolean selected = item.id == mModel.getSortedDimensionId() in getView()
165 && item.direction == mModel.getCurrentSortDirection(); in getView()
/packages/apps/Calendar/src/com/android/calendar/widget/
DCalendarAppWidgetService.java125 private static CalendarAppWidgetModel mModel; field in CalendarAppWidgetService.CalendarFactory
214 if (mModel == null) {
223 if (mModel.mEventInfos.isEmpty() || mModel.mRowInfos.isEmpty()) {
232 RowInfo rowInfo = mModel.mRowInfos.get(position);
236 DayInfo dayInfo = mModel.mDayInfos.get(rowInfo.mIndex);
241 final EventInfo eventInfo = mModel.mEventInfos.get(rowInfo.mIndex);
333 if (mModel == null) {
336 return Math.max(1, mModel.mRowInfos.size());
341 if (mModel == null || mModel.mRowInfos.isEmpty() || position >= getCount()) {
344 RowInfo rowInfo = mModel.mRowInfos.get(position);
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DPhotoPage.java130 private PhotoPage.Model mModel; field in PhotoPage
334 updateCurrentPhoto(mModel.getMediaItem(0)); in onCreate()
473 mModel = pda; in onCreate()
474 mPhotoView.setModel(mModel); in onCreate()
506 MediaItem photo = mModel.getMediaItem(0); in onCreate()
517 if (!mModel.isEmpty()) { in onCreate()
518 MediaItem photo = mModel.getMediaItem(0); in onCreate()
538 mModel = new SinglePhotoDataAdapter(mActivity, mPhotoView, mediaItem); in onCreate()
539 mPhotoView.setModel(mModel); in onCreate()
662 MediaItem current = mModel.getMediaItem(0); in launchTinyPlanet()
[all …]
/packages/apps/TV/common/src/com/android/tv/common/feature/
DModel.java29 private final String mModel; field in Model.ModelFeature
32 mModel = model; in ModelFeature()
41 return android.os.Build.MODEL.equals(mModel); in isEnabled()
46 return "ModelFeature(" + mModel + ")=" + isEnabled(); in toString()

123