Home
last modified time | relevance | path

Searched refs:context (Results 1 – 25 of 3343) sorted by relevance

12345678910>>...134

/frameworks/ml/nn/common/operations/
DUnidirectionalSequenceLSTM.cpp93 inline bool hasTensor(IOperationExecutionContext* context, const uint32_t tensor) { in hasTensor() argument
94 return context->getInputBuffer(tensor) != nullptr; in hasTensor()
97 inline bool isTimeMajor(IOperationExecutionContext* context) { in isTimeMajor() argument
98 return context->getInputValue<bool>(kTimeMajorParam); in isTimeMajor()
102 inline LSTMParams getLSTMParams(IOperationExecutionContext* context) { in getLSTMParams() argument
105 static_cast<TfLiteFusedActivation>(context->getInputValue<int32_t>(kActivationParam)); in getLSTMParams()
106 params.cell_clip = static_cast<float>(context->getInputValue<T>(kCellClipParam)); in getLSTMParams()
107 params.proj_clip = static_cast<float>(context->getInputValue<T>(kProjClipParam)); in getLSTMParams()
108 params.use_cifg = !hasTensor(context, kInputToInputWeightsTensor); in getLSTMParams()
109 params.use_peephole = hasTensor(context, kCellToOutputWeightsTensor); in getLSTMParams()
[all …]
DComparisons.cpp74 bool executeLessTyped(IOperationExecutionContext* context) { in executeLessTyped() argument
76 std::less<ComparisonType>(), context->getInputBuffer<DataType>(kInputTensor1), in executeLessTyped()
77 context->getInputShape(kInputTensor1), context->getInputBuffer<DataType>(kInputTensor2), in executeLessTyped()
78 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeLessTyped()
79 context->getOutputShape(kOutputTensor)); in executeLessTyped()
83 bool executeLessEqualTyped(IOperationExecutionContext* context) { in executeLessEqualTyped() argument
85 std::less_equal<ComparisonType>(), context->getInputBuffer<DataType>(kInputTensor1), in executeLessEqualTyped()
86 context->getInputShape(kInputTensor1), context->getInputBuffer<DataType>(kInputTensor2), in executeLessEqualTyped()
87 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeLessEqualTyped()
88 context->getOutputShape(kOutputTensor)); in executeLessEqualTyped()
[all …]
DElementwise.cpp50 bool execute(IOperationExecutionContext* context, float func(float)) { in execute() argument
51 switch (context->getInputType(kInputTensor)) { in execute()
53 return compute<float, _Float16>(func, context->getInputBuffer<_Float16>(kInputTensor), in execute()
54 context->getInputShape(kInputTensor), in execute()
55 context->getOutputBuffer<_Float16>(kOutputTensor)); in execute()
57 return compute<float, float>(func, context->getInputBuffer<float>(kInputTensor), in execute()
58 context->getInputShape(kInputTensor), in execute()
59 context->getOutputBuffer<float>(kOutputTensor)); in execute()
67 bool executeAbs(IOperationExecutionContext* context) { in executeAbs() argument
68 switch (context->getInputType(kInputTensor)) { in executeAbs()
[all …]
DSlice.cpp84 bool validate(const IOperationValidationContext* context) { in validate() argument
85 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
86 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
88 const OperandType inputType = context->getInputType(kInputTensor); in validate()
96 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_3)); in validate()
98 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
100 return validateInputTypes(context, in validate()
102 validateOutputTypes(context, {inputType}); in validate()
105 bool prepare(IOperationExecutionContext* context) { in prepare() argument
106 const Shape& inputShape = context->getInputShape(kInputTensor); in prepare()
[all …]
DTranspose.cpp76 bool validate(const IOperationValidationContext* context) { in validate() argument
77 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
78 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
80 const OperandType inputType = context->getInputType(kInputTensor); in validate()
82 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_1)); in validate()
84 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
86 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_3)); in validate()
90 const Shape& input = context->getInputShape(kInputTensor); in validate()
94 return validateInputTypes(context, {inputType, OperandType::TENSOR_INT32}) && in validate()
95 validateOutputTypes(context, {inputType}); in validate()
[all …]
DActivation.cpp359 bool validate(OperationType opType, const IOperationValidationContext* context) { in validate() argument
360 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
361 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
362 auto inputType = context->getInputType(kInputTensor); in validate()
364 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_0)); in validate()
366 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
369 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
371 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_0)); in validate()
374 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_3)); in validate()
378 const Shape& input = context->getInputShape(kInputTensor); in validate()
[all …]
DReduce.cpp52 inline bool compute(IOperationExecutionContext* context, T init, T func(T, T)) { in compute() argument
53 const Shape inputShape = context->getInputShape(kInputTensor); in compute()
54 const Shape axesShape = context->getInputShape(kInputAxes); in compute()
55 const Shape outputShape = context->getOutputShape(kOutputTensor); in compute()
61 context->getInputBuffer<T>(kInputTensor), in compute()
63 context->getOutputBuffer<T>(kOutputTensor), in compute()
65 outputShape.dimensions.size(), context->getInputBuffer<int32_t>(kInputAxes), numAxes, in compute()
66 context->getInputValue<bool8>(kInputKeepDims), tempIndex.data(), tempAxes.data(), init, in compute()
72 bool validateProdSum(const IOperationValidationContext* context) { in validateProdSum() argument
73 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validateProdSum()
[all …]
DBroadcast.cpp438 bool validate(OperationType opType, const IOperationValidationContext* context) { in validate() argument
442 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
443 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
444 auto inputType = context->getInputType(kInputTensor1); in validate()
446 NN_RET_CHECK(validateHalVersion(context, std::max(HalVersion::V1_0, opIntroducedAt))); in validate()
448 NN_RET_CHECK(validateHalVersion(context, std::max(HalVersion::V1_2, opIntroducedAt))); in validate()
451 NN_RET_CHECK(validateHalVersion(context, std::max(HalVersion::V1_2, opIntroducedAt))); in validate()
455 Shape output = context->getOutputShape(kOutputTensor); in validate()
456 Shape input1 = context->getInputShape(kInputTensor1); in validate()
457 Shape input2 = context->getInputShape(kInputTensor2); in validate()
[all …]
DGather.cpp65 bool validate(const IOperationValidationContext* context) { in validate() argument
66 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
67 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
68 OperandType inputType = context->getInputType(kInputTensor); in validate()
75 NN_RET_CHECK(validateInputTypes(context, in validate()
77 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
79 return validateHalVersion(context, HalVersion::V1_3); in validate()
81 return validateHalVersion(context, HalVersion::V1_2); in validate()
85 bool prepare(IOperationExecutionContext* context) { in prepare() argument
86 Shape input = context->getInputShape(kInputTensor); in prepare()
[all …]
DGenerateProposals.cpp203 bool validate(const IOperationValidationContext* context) { in validate() argument
204 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
205 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
207 auto inputType = context->getInputType(kRoiTensor); in validate()
208 auto deltaInputType = context->getInputType(kDeltaTensor); in validate()
224 NN_RET_CHECK(validateInputTypes(context, inExpectedTypes)); in validate()
225 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
226 return validateHalVersion(context, HalVersion::V1_2); in validate()
229 bool prepare(IOperationExecutionContext* context) { in prepare() argument
230 Shape roiShape = context->getInputShape(kRoiTensor); in prepare()
[all …]
DPRelu.cpp101 bool validate(const IOperationValidationContext* context) { in validate() argument
102 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
103 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
104 auto inputType = context->getInputType(kInputTensor); in validate()
110 NN_RET_CHECK(validateInputTypes(context, {inputType, inputType})); in validate()
111 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
113 return validateHalVersion(context, HalVersion::V1_3); in validate()
115 return validateHalVersion(context, HalVersion::V1_2); in validate()
119 bool prepare(IOperationExecutionContext* context) { in prepare() argument
120 Shape input = context->getInputShape(kInputTensor); in prepare()
[all …]
DQLSTM.cpp98 inline bool hasTensor(IOperationExecutionContext* context, const uint32_t tensor) { in hasTensor() argument
99 return context->getInputBuffer(tensor) != nullptr; in hasTensor()
106 bool validate(const IOperationValidationContext* context) { in validate() argument
107 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
108 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
143 NN_RET_CHECK(validateInputTypes(context, inExpectedTypes)); in validate()
152 NN_RET_CHECK(validateOutputTypes(context, outExpectedTypes)); in validate()
154 return validateHalVersion(context, HalVersion::V1_3); in validate()
157 bool prepare(IOperationExecutionContext* context) { in prepare() argument
174 NN_RET_CHECK(!context->isOmittedInput(tensor)) in prepare()
[all …]
DFullyConnected.cpp223 bool validate(const IOperationValidationContext* context) { in validate() argument
224 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
225 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
226 auto inputType = context->getInputType(kInputTensor); in validate()
230 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_0)); in validate()
238 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
249 const float inputScale = context->getInputShape(kInputTensor).scale; in validate()
250 const float weightsScale = context->getInputShape(kWeightsTensor).scale; in validate()
251 const float outputScale = context->getOutputShape(kOutputTensor).scale; in validate()
255 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
[all …]
DElu.cpp58 bool validate(const IOperationValidationContext* context) { in validate() argument
59 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
60 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
61 auto inputType = context->getInputType(kInputTensor); in validate()
63 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_3)); in validate()
69 return validateInputTypes(context, {inputType, scalarType}) && in validate()
70 validateOutputTypes(context, {inputType}); in validate()
73 bool prepare(IOperationExecutionContext* context) { in prepare() argument
74 Shape inputShape = context->getInputShape(kInputTensor); in prepare()
75 return context->setOutputShape(kOutputTensor, inputShape); in prepare()
[all …]
DChannelShuffle.cpp63 bool validate(const IOperationValidationContext* context) { in validate() argument
64 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
65 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
66 auto inputType = context->getInputType(kInputTensor); in validate()
72 const Shape& inputShape = context->getInputShape(kInputTensor); in validate()
76 NN_RET_CHECK(validateInputTypes(context, {inputType, OperandType::INT32, OperandType::INT32})); in validate()
77 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
79 return validateHalVersion(context, HalVersion::V1_3); in validate()
81 return validateHalVersion(context, HalVersion::V1_2); in validate()
85 bool prepare(IOperationExecutionContext* context) { in prepare() argument
[all …]
DRoiPooling.cpp190 bool validate(const IOperationValidationContext* context) { in validate() argument
191 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
192 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
194 auto inputType = context->getInputType(kInputTensor); in validate()
219 NN_RET_CHECK(validateInputTypes(context, inExpectedTypes)); in validate()
220 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
222 return validateHalVersion(context, HalVersion::V1_3); in validate()
225 return validateHalVersion(context, HalVersion::V1_2); in validate()
229 bool prepare(IOperationExecutionContext* context) { in prepare() argument
230 bool useNchw = context->getInputValue<bool>(kLayoutScalar); in prepare()
[all …]
DSelect.cpp61 bool executeTyped(IOperationExecutionContext* context) { in executeTyped() argument
63 context->getInputBuffer<bool8>(kInputCondition), in executeTyped()
64 context->getInputShape(kInputCondition), context->getInputBuffer<T>(kInputTensor1), in executeTyped()
65 context->getInputShape(kInputTensor1), context->getInputBuffer<T>(kInputTensor2), in executeTyped()
66 context->getInputShape(kInputTensor2), context->getOutputBuffer<T>(kOutputTensor), in executeTyped()
67 context->getOutputShape(kOutputTensor)); in executeTyped()
72 bool validate(const IOperationValidationContext* context) { in validate() argument
73 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
74 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
75 OperandType inputType = context->getInputType(kInputTensor1); in validate()
[all …]
DQuantize.cpp69 bool validate(const IOperationValidationContext* context) { in validate() argument
70 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
71 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
73 const OperandType inputType = context->getInputType(kInputTensor); in validate()
74 const OperandType outputType = context->getOutputType(kOutputTensor); in validate()
83 return validateHalVersion(context, HalVersion::V1_3); in validate()
85 return validateHalVersion(context, HalVersion::V1_2); in validate()
89 bool prepare(IOperationExecutionContext* context) { in prepare() argument
90 const Shape& input = context->getInputShape(kInputTensor); in prepare()
91 Shape output = context->getOutputShape(kOutputTensor); in prepare()
[all …]
DLogicalAndOr.cpp63 bool validate(const IOperationValidationContext* context) { in validate() argument
64 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
65 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
66 OperandType inputType = context->getInputType(kInputTensor1); in validate()
69 NN_RET_CHECK(validateInputTypes(context, {inputType, inputType})); in validate()
70 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
71 return validateHalVersion(context, HalVersion::V1_2); in validate()
74 bool prepare(IOperationExecutionContext* context) { in prepare() argument
75 Shape input1 = context->getInputShape(kInputTensor1); in prepare()
76 Shape input2 = context->getInputShape(kInputTensor2); in prepare()
[all …]
/frameworks/base/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/
DCarrierActionUtils.java60 public static void applyCarrierAction(int actionIdx, Intent intent, Context context) { in applyCarrierAction() argument
63 onEnableAllMeteredApns(intent, context); in applyCarrierAction()
66 onDisableAllMeteredApns(intent, context); in applyCarrierAction()
69 onDisableRadio(intent, context); in applyCarrierAction()
72 onEnableRadio(intent, context); in applyCarrierAction()
75 onShowCaptivePortalNotification(intent, context); in applyCarrierAction()
78 onShowNoDataServiceNotification(context); in applyCarrierAction()
81 onCancelAllNotifications(context); in applyCarrierAction()
84 onEnableDefaultURLHandler(context); in applyCarrierAction()
87 onDisableDefaultURLHandler(context); in applyCarrierAction()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DFrameworkFacade.java58 public boolean setIntegerSetting(Context context, String name, int def) { in setIntegerSetting() argument
59 return Settings.Global.putInt(context.getContentResolver(), name, def); in setIntegerSetting()
62 public int getIntegerSetting(Context context, String name, int def) { in getIntegerSetting() argument
63 return Settings.Global.getInt(context.getContentResolver(), name, def); in getIntegerSetting()
66 public long getLongSetting(Context context, String name, long def) { in getLongSetting() argument
67 return Settings.Global.getLong(context.getContentResolver(), name, def); in getLongSetting()
70 public boolean setStringSetting(Context context, String name, String def) { in setStringSetting() argument
71 return Settings.Global.putString(context.getContentResolver(), name, def); in setStringSetting()
74 public String getStringSetting(Context context, String name) { in getStringSetting() argument
75 return Settings.Global.getString(context.getContentResolver(), name); in getStringSetting()
[all …]
/frameworks/base/telephony/common/com/android/internal/telephony/
DTelephonyPermissions.java93 Context context, int subId, String callingPackage, @Nullable String callingFeatureId, in checkCallingOrSelfReadPhoneState() argument
95 return checkReadPhoneState(context, subId, Binder.getCallingPid(), Binder.getCallingUid(), in checkCallingOrSelfReadPhoneState()
101 Context context, int subId, String callingPackage, @Nullable String callingFeatureId, in checkCallingOrSelfReadPhoneStateNoThrow() argument
104 return checkCallingOrSelfReadPhoneState(context, subId, callingPackage, in checkCallingOrSelfReadPhoneStateNoThrow()
134 Context context, int subId, int pid, int uid, String callingPackage, in checkReadPhoneState() argument
137 context.enforcePermission( in checkReadPhoneState()
144 context.enforcePermission( in checkReadPhoneState()
150 enforceCarrierPrivilege(context, subId, uid, message); in checkReadPhoneState()
159 AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in checkReadPhoneState()
168 public static boolean checkCarrierPrivilegeForSubId(Context context, int subId) { in checkCarrierPrivilegeForSubId() argument
[all …]
/frameworks/base/core/java/android/app/admin/
DDeviceAdminReceiver.java519 public @NonNull DevicePolicyManager getManager(@NonNull Context context) { in getManager() argument
523 mManager = (DevicePolicyManager)context.getSystemService( in getManager()
533 public @NonNull ComponentName getWho(@NonNull Context context) { in getWho() argument
537 mWho = new ComponentName(context, getClass()); in getWho()
554 public void onEnabled(@NonNull Context context, @NonNull Intent intent) { in onEnabled() argument
568 public @Nullable CharSequence onDisableRequested(@NonNull Context context, in onDisableRequested() argument
581 public void onDisabled(@NonNull Context context, @NonNull Intent intent) { in onDisabled() argument
596 public void onPasswordChanged(@NonNull Context context, @NonNull Intent intent) { in onPasswordChanged() argument
610 public void onPasswordChanged(@NonNull Context context, @NonNull Intent intent, in onPasswordChanged() argument
612 onPasswordChanged(context, intent); in onPasswordChanged()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/
DPowerUtil.java56 public static String getBatteryRemainingStringFormatted(Context context, long drainTimeMs, in getBatteryRemainingStringFormatted() argument
61 return getShutdownImminentString(context, percentageString); in getBatteryRemainingStringFormatted()
64 CharSequence timeString = StringUtil.formatElapsedTime(context, in getBatteryRemainingStringFormatted()
67 return getUnderFifteenString(context, timeString, percentageString); in getBatteryRemainingStringFormatted()
70 return getMoreThanTwoDaysString(context, percentageString); in getBatteryRemainingStringFormatted()
73 return getMoreThanOneDayString(context, drainTimeMs, in getBatteryRemainingStringFormatted()
77 return getRegularTimeRemainingString(context, drainTimeMs, in getBatteryRemainingStringFormatted()
96 Context context, long drainTimeMs) { in getBatteryRemainingShortStringFormatted() argument
102 return getRegularTimeRemainingShortString(context, drainTimeMs); in getBatteryRemainingShortStringFormatted()
104 return getMoreThanOneDayShortString(context, drainTimeMs, in getBatteryRemainingShortStringFormatted()
[all …]
/frameworks/base/core/jni/
Druntime_native_boot-flags-test.sh66 local context=$1
70 say "[$context] Check that the device configuration flag is set..."
81 local context=$1
84 say "[$context] Check that the device configuration flag is not set..."
108 local context=$1
112 say "[$context] Check that the persistent system property is set..."
123 local context=$1
126 say "[$context] Check that the persistent system property is not set..."
147 local context=$1
151 "[$context] Check that all zygote processes are passed \`$runtime_option\` as runtime option..."
[all …]

12345678910>>...134