/base/telephony/sms_mms/test/fuzztest/smspdubuffer_fuzzer/ |
D | smspdubuffer_fuzzer.cpp | 36 for (uint16_t i = 0; i < desLen; i++) { in ReadBuffer() local 37 buffer->SetIndex(i); in ReadBuffer() 40 for (uint16_t i = 0; i < desLen; i++) { in ReadBuffer() local 41 buffer->MoveBack(i); in ReadBuffer() 43 for (uint16_t i = 0; i < desLen; i++) { in ReadBuffer() local 44 buffer->MoveForward(i); in ReadBuffer() 50 for (uint16_t i = 0; i < desLen; i++) { in ReadBuffer() local 57 for (uint16_t i = 0; i < desLen; i++) { in ReadBuffer() local 73 for (uint16_t i = 0; i < size; i++) { in WriteBuffer() local 74 buffer->SetIndex(i); in WriteBuffer() [all …]
|
/base/powermgr/battery_statistics/test/unittest/src/servicetest/utils/ |
D | string_filter.cpp | 41 for (int i = 0; i < CHAR_RANGE; ++i) { in StringFilter() local 43 ss << static_cast<char>(i); in StringFilter() 44 ss >> charTab_[i]; in StringFilter() 52 int i = 0; in StringFilter() local 54 for (i = 0; i < CHAR_RANGE; ++i) { in StringFilter() 55 statTab_[STATE_BEGIN][i] = STATE_STOP; in StringFilter() 57 for (i = 'a'; i <= 'z'; ++i) { in StringFilter() 58 statTab_[STATE_BEGIN][i] = STATE_RUN; in StringFilter() 60 for (i = 'A'; i <= 'Z'; ++i) { in StringFilter() 61 statTab_[STATE_BEGIN][i] = STATE_RUN; in StringFilter() [all …]
|
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/ |
D | stringfilter.cpp | 41 for (int i = 0; i < CHAR_RANGE; ++i) { in StringFilter() local 43 ss << static_cast<char>(i); in StringFilter() 44 ss >> charTab_[i]; in StringFilter() 52 int i = 0; in StringFilter() local 54 for (i = 0; i < CHAR_RANGE; ++i) { in StringFilter() 55 statTab_[STATE_BEGIN][i] = STATE_STOP; in StringFilter() 57 for (i = 'a'; i <= 'z'; ++i) { in StringFilter() 58 statTab_[STATE_BEGIN][i] = STATE_RUN; in StringFilter() 60 for (i = 'A'; i <= 'Z'; ++i) { in StringFilter() 61 statTab_[STATE_BEGIN][i] = STATE_RUN; in StringFilter() [all …]
|
/base/sensors/sensor/vibration_convert/core/algorithm/conversion/src/ |
D | fft.cpp | 47 for (uint32_t i = 0; i < MAX_FAST_BITS; ++i) { in ~Fft() local 48 if (fftBitTable_[i] != nullptr) { in ~Fft() 49 free(fftBitTable_[i]); in ~Fft() 50 fftBitTable_[i] = nullptr; in ~Fft() 74 for (uint32_t i = 0; i < length; ++i) { in AlgInitFFT() local 75 fftBitTable_[j - 1][i] = ReverseBits(i, j); in AlgInitFFT() 106 for (int32_t i = 0; i < paraRes.numSamples; i += blockSize) { in AlgFFT() local 111 for (int32_t j = i, n = 0; n < blockEnd; ++j, ++n) { in AlgFFT() 139 for (int32_t i = 0; i < paraRes.numSamples; ++i) { in Normalize() local 140 paraRes.realOut[i] /= denom; in Normalize() [all …]
|
D | conversion_mfcc.cpp | 40 for (uint32_t i = 0; i < numFilters_; ++i) { in HandleMelFilterAndLogSquare() local 41 melBands_[i] = 0; in HandleMelFilterAndLogSquare() 43 uint32_t idx = i + (bin * numFilters_); in HandleMelFilterAndLogSquare() 44 melBands_[i] += (melFilters_[idx] * powerSpectrum[bin]); in HandleMelFilterAndLogSquare() 47 for (uint32_t i = 0; i < numFilters_; ++i) { in HandleMelFilterAndLogSquare() local 49 melBands_[i] = (melBands_[i] > BANDS_MIN_THRESHOLD) ? log(melBands_[i] * melBands_[i]) : 0; in HandleMelFilterAndLogSquare() 104 for (uint32_t i = 0; i < numCoeffs_; i++) { in HandleDiscreteCosineTransform() local 105 coeffs_[i] = 0; in HandleDiscreteCosineTransform() 107 uint32_t idx = i + (j * numCoeffs_); in HandleDiscreteCosineTransform() 108 coeffs_[i] += (dctMatrix_[idx] * melBands_[j]); in HandleDiscreteCosineTransform() [all …]
|
/base/security/device_auth/services/legacy/authenticators/src/account_related/ |
D | account_multi_task_manager.c | 26 for (uint32_t i = 0; i < ACCOUNT_MULTI_TASK_MAX_SIZE; ++i) { in IsManagerHasTaskId() local 27 if (g_taskManager.taskArray[i] != NULL && taskId == g_taskManager.taskArray[i]->taskId) { in IsManagerHasTaskId() 69 for (uint32_t i = 0; i < ACCOUNT_MULTI_TASK_MAX_SIZE; ++i) { in AddTaskToManager() local 70 if (g_taskManager.taskArray[i] == NULL) { in AddTaskToManager() 71 g_taskManager.taskArray[i] = task; in AddTaskToManager() 82 for (uint32_t i = 0; i < ACCOUNT_MULTI_TASK_MAX_SIZE; ++i) { in GetTaskFromManager() local 83 … if ((g_taskManager.taskArray[i] != NULL) && (g_taskManager.taskArray[i]->taskId == taskId)) { in GetTaskFromManager() 84 return g_taskManager.taskArray[i]; in GetTaskFromManager() 93 for (uint32_t i = 0; i < ACCOUNT_MULTI_TASK_MAX_SIZE; ++i) { in DeleteTaskFromManager() local 94 … if ((g_taskManager.taskArray[i] != NULL) && (g_taskManager.taskArray[i]->taskId == taskId)) { in DeleteTaskFromManager() [all …]
|
/base/hiviewdfx/faultloggerd/test/unittest/unwind/ |
D | regs_test.cpp | 50 for (size_t i = 0; i < 10; i++) { // test 10 regs variable 51 setRegs.push_back(i); 60 for (size_t i = 0; i < getRegs.size(); i++) { variable 61 ASSERT_EQ(regsData[i], getRegs[i]); 143 for (int i = 0; i < 31; i++) { variable 144 context.uc_mcontext.regs[i] = i; 168 for (size_t i = 0; i < REG_LAST; i++) { variable 169 ASSERT_EQ((*dfxRegs.get())[i], i); 184 for (size_t i = 0; i < QUT_MINI_REGS_SIZE; ++i) { variable 185 pushRegs[i] = i + 1; [all …]
|
D | symbols_test.cpp | 61 for (size_t i = 0; i < symbolsImitate.size(); ++i) { variable 62 symbols[i].fileVaddr_ = symbolsImitate[i].fileVaddr_; 63 symbols[i].funcVaddr_ = symbolsImitate[i].funcVaddr_; 64 symbols[i].name_ = symbolsImitate[i].name_; 65 symbols[i].demangle_ = symbolsImitate[i].demangle_; 66 symbols[i].module_ = symbolsImitate[i].module_; 72 for (size_t i = 0; i < symbolsImitate.size(); ++i) { variable 73 symbols[i].fileVaddr_ = symbolsImitate[i].fileVaddr_; 74 symbols[i].funcVaddr_ = symbolsImitate[i].funcVaddr_; 75 symbols[i].name_ = symbolsImitate[i].name_; [all …]
|
/base/sensors/sensor/vibration_convert/core/algorithm/intensity_processor/src/ |
D | intensity_processor.cpp | 48 for (size_t i = 0; i < frmN; ++i) { in GetRMS() local 50 int32_t index = i * hopLength; in GetRMS() 63 for (size_t i = 0; i < dataSize; ++i) { in EnergyEnvelop() local 64 dataAbsPower.push_back(data[i] * data[i]); in EnergyEnvelop() 69 for (size_t i = 0; (i + nFft) < dataSize;) { in EnergyEnvelop() local 70 oneFrmData.assign(it + i, it + i + nFft); in EnergyEnvelop() 73 i += hopLength; in EnergyEnvelop() 88 for (size_t i = 0; i < rmseBand.size(); ++i) { in RmseNormalize() local 89 if (rmseBand[i] < lowerDelta) { in RmseNormalize() 90 rmseBand[i] = 0; in RmseNormalize() [all …]
|
/base/sensors/sensor/vibration_convert/core/utils/src/ |
D | utils.cpp | 56 for (uint32_t i = 0;; i++) { in ObtainNumberOfBits() local 57 if (powerOfTwo & (1 << i)) { in ObtainNumberOfBits() 58 return i; in ObtainNumberOfBits() 67 for (uint32_t i = 0; i < numBits; i++) { in ReverseBits() local 90 for (size_t i = 0; i < rows; i++) { in TransposeMatrix() local 92 dst[j * rows + i] = values[index++]; in TransposeMatrix() 114 int32_t i = 1; in UniqueIdx() local 115 while (i < idxLen) { in UniqueIdx() 116 if (newIdx[i] == preIdx) { in UniqueIdx() 117 newIdx.erase(newIdx.begin() + i); in UniqueIdx() [all …]
|
/base/startup/hvb/libhvb/src/crypto/ |
D | hvb_rsa.c | 64 int i; in lin_compare() local 70 for (i = p_a->valid_word_len - 1; i >= 0; --i) { in lin_compare() 71 if (p_a->p_uint[i] != p_b->p_uint[i]) { in lin_compare() 72 if (p_a->p_uint[i] > p_b->p_uint[i]) { in lin_compare() 137 uint32_t i; in lin_update_valid_len() local 144 for (i = 0; i < p_a->valid_word_len; ++i) { in lin_update_valid_len() 150 p_a->valid_word_len -= i; in lin_update_valid_len() 207 uint32_t i; in lin_sub() local 212 for (i = 0; i < p_b->valid_word_len; ++i) { in lin_sub() 213 t = p_a->p_uint[i] < c; in lin_sub() [all …]
|
/base/sensors/sensor/vibration_convert/core/algorithm/peak_finder/src/ |
D | peak_finder.cpp | 56 for (size_t i = 0; i < idxsSize; i++) { in ExtractValues() local 57 if (idxs[i] >= envelopSize) { in ExtractValues() 60 values.push_back(envelope[idxs[i]]); in ExtractValues() 74 for (size_t i = 0; i < peaks.size(); i++) { in GetVoiceFlag() local 75 if (peaks[i] > data.size()) { in GetVoiceFlag() 78 peakAmp.push_back(fabs(data[peaks[i]])); in GetVoiceFlag() 85 for (size_t i = 0; i < data.size(); i++) { in GetVoiceFlag() local 86 triangularEnvelope[i] = fabs(data[i]); in GetVoiceFlag() 89 for (size_t i = 0; i < triangularEnvelope.size(); i++) { in GetVoiceFlag() local 90 if (triangularEnvelope[i] < threshold) { in GetVoiceFlag() [all …]
|
/base/security/huks/frameworks/huks_standard/main/common/src/ |
D | hks_ability.c | 27 for (int i = 0; i < HKS_ABILITY_MAX_SIZE; i++) { in RegisterAbility() local 28 if (g_abilityList[i].id == id) { in RegisterAbility() 30 } else if (g_abilityList[i].id != 0) { in RegisterAbility() 33 g_abilityList[i].id = id; in RegisterAbility() 34 g_abilityList[i].func = func; in RegisterAbility() 35 HKS_LOG_I("register ability i = %" LOG_PUBLIC "d, id = 0x%" LOG_PUBLIC "x", i, id); in RegisterAbility() 44 for (int i = 0; i < HKS_ABILITY_MAX_SIZE; i++) { in GetAbility() local 45 if (g_abilityList[i].id == id) { in GetAbility() 46 return g_abilityList[i].func; in GetAbility()
|
/base/powermgr/thermal_manager/application/protector/src/policy/ |
D | protector_thermal_zone_info.cpp | 81 for (uint32_t i = level; i < tzItemList_.size(); i++) { in HandleAscNextUpTemp() local 82 if (curTemp >= tzItemList_.at(i).threshold) { in HandleAscNextUpTemp() 83 level = tzItemList_.at(i).level; in HandleAscNextUpTemp() 93 for (uint32_t i = level; i >= 1; i--) { in HandleAscCurDownTemp() local 94 if (curTemp < tzItemList_.at(i - 1).thresholdClr) { in HandleAscCurDownTemp() 95 level = (tzItemList_.at(i - 1).level > 0) ? (tzItemList_.at(i - 1).level - 1) : 0; in HandleAscCurDownTemp() 107 for (uint32_t i = level; i >= 1; i--) { in HandleAscMaxSizeTemp() local 108 if (curTemp < tzItemList_.at(i - 1).thresholdClr) { in HandleAscMaxSizeTemp() 109 level = (tzItemList_.at(i - 1).level > 0) ? (tzItemList_.at(i - 1).level - 1) : 0; in HandleAscMaxSizeTemp() 122 for (uint32_t i = level; i < tzItemList_.size(); i++) { in HandleAscMinSizeTemp() local [all …]
|
/base/location/services/location_locator/locator/source/ |
D | work_record.cpp | 35 for (int i = 0; i < num; i++) { in ReadFromParcel() local 68 for (int i = 0; i < num_; i++) { in Marshalling() local 69 parcel.WriteInt32(uids_[i]); in Marshalling() 70 parcel.WriteInt32(pids_[i]); in Marshalling() 71 parcel.WriteString(names_[i]); in Marshalling() 72 parcel.WriteInt32(timeInterval_[i]); in Marshalling() 73 parcel.WriteString(uuid_[i]); in Marshalling() 74 parcel.WriteInt32(nlpRequestType_[i]); in Marshalling() 87 for (int i = 0; i < num_; i++) { in MarshallingWorkRecord() local 88 parcel.WriteInt32(uids_[i]); in MarshallingWorkRecord() [all …]
|
/base/security/device_auth/common_lib/impl/src/ |
D | string_util.c | 44 for (uint32_t i = 0; i < byteLen; i++) { in ByteToHexString() local 45 …hexStr[i * BYTE_TO_HEX_OPER_LENGTH] = HexToChar((byte[i] & 0xF0) >> 4); /* 4: shift right for fill… in ByteToHexString() 46 hexStr[i * BYTE_TO_HEX_OPER_LENGTH + 1] = HexToChar(byte[i] & 0x0F); /* get low four bits */ in ByteToHexString() 77 for (uint32_t i = 0; i < realHexLen / BYTE_TO_HEX_OPER_LENGTH; i++) { in HexStringToByte() local 78 uint8_t high = CharToHex(hexStr[i * BYTE_TO_HEX_OPER_LENGTH]); in HexStringToByte() 79 uint8_t low = CharToHex(hexStr[i * BYTE_TO_HEX_OPER_LENGTH + 1]); in HexStringToByte() 83 byte[i] = high << 4; /* 4: Set the high nibble */ in HexStringToByte() 84 byte[i] |= low; /* Set the low nibble */ in HexStringToByte() 107 for (uint32_t i = 0; i < len; i++) { in ToUpperCase() local 108 if ((oriStr[i] >= 'a') && (oriStr[i] <= 'f')) { in ToUpperCase() [all …]
|
/base/sensors/sensor/vibration_convert/core/native/src/ |
D | vibration_convert_core.cpp | 92 for (size_t i = 0; i < intensityDatas.size(); i++) { in GetAudioData() local 93 rmseIntensityNorm.push_back(intensityDatas[i].rmseIntensityNorm); in GetAudioData() 106 for (size_t i = 0; i < unionTransientEvents.size(); i++) { in GetAudioData() local 107 transientEventFlags.push_back(unionTransientEvents[i].transientEventFlag); in GetAudioData() 146 for (size_t i = 0; i < (originDataSize - 1); i += RESAMPLE_MULTIPLE) { in ResampleAudioData() local 147 srcAudioDatas_.push_back(srcDatas[i]); in ResampleAudioData() 148 srcAudioDatas_.push_back(srcDatas[i+1]); in ResampleAudioData() 165 for (int32_t i = 0; i < absDataSize; ++i) { in PreprocessAudioData() local 166 absData[i] = std::fabs(absData[i]); in PreprocessAudioData() 167 if (absData[i] < AMP_INVALIDE_DELTA) { in PreprocessAudioData() [all …]
|
/base/security/asset/frameworks/utils/src/ |
D | hasher.rs | 40 for (i, item) in expanded_chunk.iter_mut().enumerate().take(16) { 41 let offset = i * U8_PER_U32; 48 for i in 16..64 { 49 let s0 = expanded_chunk[i - 15].rotate_right(7) 50 ^ expanded_chunk[i - 15].rotate_right(18) 51 ^ (expanded_chunk[i - 15] >> 3); 52 let s1 = expanded_chunk[i - 2].rotate_right(17) 53 ^ expanded_chunk[i - 2].rotate_right(19) 54 ^ (expanded_chunk[i - 2] >> 10); 55 expanded_chunk[i] = [all …]
|
/base/startup/init/test/exec_test/ |
D | fd_holder_test.c | 32 int i; in SaveFds() local 33 for (i = 0; i < argc; i++) { in SaveFds() 34 BEGET_LOGI("Opening %s \n", argv[i]); in SaveFds() 35 …fds[i] = open(argv[i], O_APPEND | O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, S_IRUSR|S_IWUSR|S_IRGRP|… in SaveFds() 36 if (fds[i] < 0) { in SaveFds() 37 BEGET_LOGI("Failed to open file %s\n", argv[i]); in SaveFds() 40 (void)write(fds[i], "hello", BUFFER_LENGTH); in SaveFds() 42 int fdCount = i; in SaveFds() 64 for (size_t i = 0; i < outfdCount; i++) { in main() local 65 int fd = fds[i]; in main()
|
/base/security/certificate_framework/frameworks/ability/src/ |
D | cf_ability.c | 25 for (uint32_t i = 0; i < CF_ABILITY_MAX_SIZE; ++i) { in RegisterAbility() local 26 if (g_abilityList[i].id == id) { in RegisterAbility() 28 } else if (g_abilityList[i].id != 0) { in RegisterAbility() 32 g_abilityList[i].id = id; in RegisterAbility() 33 g_abilityList[i].func = func; in RegisterAbility() 42 for (uint32_t i = 0; i < CF_ABILITY_MAX_SIZE; ++i) { in GetAbility() local 43 if (g_abilityList[i].id == id) { in GetAbility() 44 return g_abilityList[i].func; in GetAbility()
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/crash_exception/ |
D | crash_exception.cpp | 55 size_t i; in GetCrashDescription() local 57 for (i = 0; i < sizeof(g_crashExceptionMap) / sizeof(g_crashExceptionMap[0]); i++) { in GetCrashDescription() 58 if (errCode == g_crashExceptionMap[i].errCode) { in GetCrashDescription() 59 return g_crashExceptionMap[i].str; in GetCrashDescription() 62 return g_crashExceptionMap[i - 1].str; /* the end of map is "unknown reason" */ in GetCrashDescription() 126 for (int i = 0; i < keySize; i++) { in CheckCrashLogValid() local 127 checkMap[i].start = file.find(checkMap[i].key); in CheckCrashLogValid() 128 if ((checkMap[i].start == std::string::npos) || in CheckCrashLogValid() 129 (checkMap[i].start + checkMap[i].key.length() + sizeof(char) >= file.length())) { in CheckCrashLogValid() 130 return checkMap[i].errCode; in CheckCrashLogValid() [all …]
|
/base/startup/appspawn/modules/ace_adapter/ |
D | command_lexer.cpp | 37 for (size_t i = 0; i < str_.size(); i++) { in GetAllArguments() local 40 if (isspace(str_[i])) { in GetAllArguments() 42 } else if (str_[i] == singleQuote) { in GetAllArguments() 44 } else if (str_[i] == doubleQuote) { in GetAllArguments() 48 lastArg += str_[i]; in GetAllArguments() 52 if (str_[i] == singleQuote) { in GetAllArguments() 54 } else if (str_[i] == doubleQuote) { in GetAllArguments() 56 } else if (!isspace(str_[i])) { in GetAllArguments() 58 lastArg += str_[i]; in GetAllArguments() 62 if (isspace(str_[i])) { in GetAllArguments() [all …]
|
/base/security/huks/services/huks_standard/huks_service/main/upgrade/file_transfer/src/ |
D | hks_config_parser.c | 43 for (uint32_t i = 0; i < paramSet->paramsCnt; ++i) { in ParseOwnerIdFromParamSet() local 44 if (paramSet->params[i].tag == HKS_TAG_PROCESS_NAME) { in ParseOwnerIdFromParamSet() 46 if (paramSet->params[i].blob.size != sizeof(uint32_t)) { in ParseOwnerIdFromParamSet() 51 *uid = *(uint32_t *)paramSet->params[i].blob.data; in ParseOwnerIdFromParamSet() 55 if (paramSet->params[i].tag == HKS_TAG_ACCESS_TOKEN_ID) { in ParseOwnerIdFromParamSet() 56 *accessTokenId = paramSet->params[i].uint64Param; in ParseOwnerIdFromParamSet() 60 if (paramSet->params[i].tag == HKS_TAG_SPECIFIC_USER_ID) { in ParseOwnerIdFromParamSet() 61 *userId = paramSet->params[i].uint32Param; in ParseOwnerIdFromParamSet() 65 if (paramSet->params[i].tag == HKS_TAG_USER_ID && !getUserId) { in ParseOwnerIdFromParamSet() 66 *userId = paramSet->params[i].uint32Param; in ParseOwnerIdFromParamSet() [all …]
|
/base/security/access_token/frameworks/accesstoken/src/ |
D | hap_policy_parcel.cpp | 37 for (uint32_t i = 0; i < permListSize; i++) { in Marshalling() local 39 permDefParcel.permissionDef = permList[i]; in Marshalling() 47 for (uint32_t i = 0; i < permStateListSize; i++) { in Marshalling() local 49 permStateParcel.permStatFull = permStateList[i]; in Marshalling() 57 for (uint32_t i = 0; i < aclRequestedListSize; i++) { in Marshalling() local 58 RETURN_IF_FALSE(out.WriteString(aclRequestedList[i])); in Marshalling() 65 for (uint32_t i = 0; i < infoSize; i++) { in Marshalling() local 66 RETURN_IF_FALSE(out.WriteString(info[i].permissionName)); in Marshalling() 67 RETURN_IF_FALSE(out.WriteBool(info[i].userCancelable)); in Marshalling() 89 for (uint32_t i = 0; i < permListSize; i++) { in Unmarshalling() local [all …]
|
/base/hiviewdfx/hiview/base/event_raw/encoded/ |
D | raw_data_builder_json_parser.cpp | 72 for (int i = 0; i < CHAR_RANGE; ++i) { in InitNoneStatus() local 73 statusTabs_[STATUS_NONE][i] = STATUS_NONE; in InitNoneStatus() 80 for (int i = 0; i < CHAR_RANGE; ++i) { in InitRunStatus() local 81 statusTabs_[STATUS_RUN][i] = STATUS_RUN; in InitRunStatus() 90 for (int i = 0; i < CHAR_RANGE; ++i) { in InitKeyParseStatus() local 91 statusTabs_[STATUS_KEY_PARSE][i] = STATUS_KEY_PARSE; in InitKeyParseStatus() 98 for (int i = 0; i < CHAR_RANGE; ++i) { in InitValueParseStatus() local 99 if ((i >= NUM_MIN_CHAR && i <= NUM_MAX_CHAR) || (i == MINUS_CHAR)) { in InitValueParseStatus() 100 statusTabs_[STATUS_VALUE_PARSE][i] = STATUS_INT_PARSE; in InitValueParseStatus() 103 statusTabs_[STATUS_VALUE_PARSE][i] = STATUS_VALUE_PARSE; in InitValueParseStatus() [all …]
|