Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 738) sorted by relevance

12345678910>>...30

/device/google/contexthub/firmware/os/algos/common/math/
Dmat.c40 static void mat33SwapRows(struct Mat33 *A, uint32_t i, uint32_t j);
43 uint32_t l, uint32_t i, uint32_t j);
45 static void mat44SwapRows(struct Mat44 *A, uint32_t i, uint32_t j);
57 uint32_t i; in initDiagonalMatrix() local
58 for (i = 0; i < 3; ++i) { in initDiagonalMatrix()
59 A->elem[i][i] = x; in initDiagonalMatrix()
100 uint32_t i; in mat33Multiply() local
101 for (i = 0; i < 3; ++i) { in mat33Multiply()
107 sum += A->elem[i][k] * B->elem[k][j]; in mat33Multiply()
110 out->elem[i][j] = sum; in mat33Multiply()
[all …]
Dvec.c59 size_t i; in vecAdd() local
60 for (i = 0; i < dim; i++) { in vecAdd()
61 u[i] = v[i] + w[i]; in vecAdd()
68 size_t i; in vecAddInPlace() local
69 for (i = 0; i < dim; i++) { in vecAddInPlace()
70 v[i] += w[i]; in vecAddInPlace()
78 size_t i; in vecSub() local
79 for (i = 0; i < dim; i++) { in vecSub()
80 u[i] = v[i] - w[i]; in vecSub()
87 size_t i; in vecScalarMul() local
[all …]
/device/generic/vulkan-cereal/third-party/astc-encoder/Source/
Dastcenc_block_sizes.cpp270 for (unsigned int i = 0; i < weights_per_block; i++) in init_decimation_info_2d() local
272 wb.texel_count_of_weight[i] = 0; in init_decimation_info_2d()
275 for (unsigned int i = 0; i < texels_per_block; i++) in init_decimation_info_2d() local
277 wb.weight_count_of_texel[i] = 0; in init_decimation_info_2d()
309 for (unsigned int i = 0; i < 4; i++) in init_decimation_info_2d() local
311 if (weight[i] != 0) in init_decimation_info_2d()
313 …b.grid_weights_of_texel[texel][wb.weight_count_of_texel[texel]] = static_cast<uint8_t>(qweight[i]); in init_decimation_info_2d()
314 wb.weights_of_texel[texel][wb.weight_count_of_texel[texel]] = static_cast<uint8_t>(weight[i]); in init_decimation_info_2d()
316 …wb.texels_of_weight[qweight[i]][wb.texel_count_of_weight[qweight[i]]] = static_cast<uint8_t>(texel… in init_decimation_info_2d()
317 …wb.texel_weights_of_weight[qweight[i]][wb.texel_count_of_weight[qweight[i]]] = static_cast<uint8_t… in init_decimation_info_2d()
[all …]
Dastcenc_pick_best_endpoint_format.cpp124 for (unsigned int i = 0; i < texel_count; i += ASTCENC_SIMD_WIDTH) in compute_error_squared_rgb_single_partition() local
126 vint tix(texel_indexes + i); in compute_error_squared_rgb_single_partition()
235 for (int i = 0; i < partition_count; i++) in compute_encoding_choice_errors() local
237 partition_metrics& pm = pms[i]; in compute_encoding_choice_errors()
278 pi, i, blk, in compute_encoding_choice_errors()
286 vfloat4 endpt0 = ep.endpt0[i]; in compute_encoding_choice_errors()
287 vfloat4 endpt1 = ep.endpt1[i]; in compute_encoding_choice_errors()
293 eci[i].rgb_scale_error = (samechroma_rgb_error - uncorr_rgb_error) * 0.7f; // empirical in compute_encoding_choice_errors()
294 eci[i].rgb_luma_error = (rgb_luma_error - uncorr_rgb_error) * 1.5f; // wild guess in compute_encoding_choice_errors()
295 eci[i].luminance_error = (luminance_rgb_error - uncorr_rgb_error) * 3.0f; // empirical in compute_encoding_choice_errors()
[all …]
Dastcenc_symbolic_physical.cpp111 for (unsigned int i = 0; i < 8; i++) in symbolic_to_physical() local
113 pcb.data[i] = cbytes[i]; in symbolic_to_physical()
116 for (unsigned int i = 0; i < BLOCK_MAX_COMPONENTS; i++) in symbolic_to_physical() local
118 pcb.data[2 * i + 8] = scb.constant_color[i] & 0xFF; in symbolic_to_physical()
119 pcb.data[2 * i + 9] = (scb.constant_color[i] >> 8) & 0xFF; in symbolic_to_physical()
130 for (unsigned int i = 0; i < 8; i++) in symbolic_to_physical() local
132 pcb.data[i] = cbytes[i]; in symbolic_to_physical()
135 for (unsigned int i = 0; i < BLOCK_MAX_COMPONENTS; i++) in symbolic_to_physical() local
137 pcb.data[2 * i + 8] = scb.constant_color[i] & 0xFF; in symbolic_to_physical()
138 pcb.data[2 * i + 9] = (scb.constant_color[i] >> 8) & 0xFF; in symbolic_to_physical()
[all …]
Dastcenc_find_best_partitioning.cpp80 for (unsigned int i = 0; i < texel_count; i++) in kmeans_init() local
82 vfloat4 color = blk.texel(i); in kmeans_init()
86 distances[i] = distance; in kmeans_init()
125 for (unsigned int i = 0; i < texel_count; i++) in kmeans_init() local
127 vfloat4 color = blk.texel(i); in kmeans_init()
130 distance = astc::min(distance, distances[i]); in kmeans_init()
132 distances[i] = distance; in kmeans_init()
159 for (unsigned int i = 0; i < texel_count; i++) in kmeans_assign() local
164 vfloat4 color = blk.texel(i); in kmeans_assign()
176 partition_of_texel[i] = static_cast<uint8_t>(best_partition); in kmeans_assign()
[all …]
Dastcenc_weight_align.cpp73 for (unsigned int i = 0; i < ANGULAR_STEPS; i++) in prepare_angular_tables() local
75 float angle_step = static_cast<float>(i + 1); in prepare_angular_tables()
79 …sin_table[j][i] = static_cast<float>(sinf((2.0f * astc::PI / (SINCOS_STEPS - 1.0f)) * angle_step *… in prepare_angular_tables()
80 …cos_table[j][i] = static_cast<float>(cosf((2.0f * astc::PI / (SINCOS_STEPS - 1.0f)) * angle_step *… in prepare_angular_tables()
105 for (unsigned int i = 0; i < weight_count; i += ASTCENC_SIMD_WIDTH) in compute_angular_offsets() local
108 vfloat sample = loada(dec_weight_ideal_value + i) * (SINCOS_STEPS - 1.0f) + vfloat(12582912.0f); in compute_angular_offsets()
110 storea(isample, isamplev + i); in compute_angular_offsets()
116 for (unsigned int i = 0; i < max_angular_steps; i += ASTCENC_SIMD_WIDTH) in compute_angular_offsets() local
124 anglesum_x += loada(cos_table[isample] + i); in compute_angular_offsets()
125 anglesum_y += loada(sin_table[isample] + i); in compute_angular_offsets()
[all …]
Dastcenc_integer_sequence.cpp516 unsigned int i = 0; in encode_ise() local
521 unsigned int i4 = input_data[i + 4] >> bits; in encode_ise()
522 unsigned int i3 = input_data[i + 3] >> bits; in encode_ise()
523 unsigned int i2 = input_data[i + 2] >> bits; in encode_ise()
524 unsigned int i1 = input_data[i + 1] >> bits; in encode_ise()
525 unsigned int i0 = input_data[i + 0] >> bits; in encode_ise()
534 pack = (input_data[i++] & mask) | (((T >> 0) & 0x3) << bits); in encode_ise()
539 pack = (input_data[i++] & mask) | (((T >> 2) & 0x3) << bits); in encode_ise()
544 pack = (input_data[i++] & mask) | (((T >> 4) & 0x1) << bits); in encode_ise()
549 pack = (input_data[i++] & mask) | (((T >> 5) & 0x3) << bits); in encode_ise()
[all …]
Dastcenc_ideal_endpoints_and_weights.cpp149 for (unsigned int i = 0; i < partition_count; i++) in compute_ideal_colors_and_weights_1_comp() local
154 unsigned int partition_texel_count = pi.partition_texel_count[i]; in compute_ideal_colors_and_weights_1_comp()
157 unsigned int tix = pi.texels_of_partition[i][j]; in compute_ideal_colors_and_weights_1_comp()
173 if (i == 0) in compute_ideal_colors_and_weights_1_comp()
184 unsigned int tix = pi.texels_of_partition[i][j]; in compute_ideal_colors_and_weights_1_comp()
193 ei.ep.endpt0[i] = select(blk.data_min, vfloat4(lowvalue), sep_mask); in compute_ideal_colors_and_weights_1_comp()
194 ei.ep.endpt1[i] = select(blk.data_max, vfloat4(highvalue), sep_mask); in compute_ideal_colors_and_weights_1_comp()
199 for (unsigned int i = texel_count; i < texel_count_simd; i++) in compute_ideal_colors_and_weights_1_comp() local
201 ei.weights[i] = 0.0f; in compute_ideal_colors_and_weights_1_comp()
202 ei.weight_error_scale[i] = 0.0f; in compute_ideal_colors_and_weights_1_comp()
[all …]
/device/google/contexthub/firmware/lib/libm/
Dkf_rem_pio2.c62 __int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih; local
76 for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (float) ipio2[j];
79 for (i=0;i<=jk;i++) {
80 for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
81 q[i] = fw;
87 for(i=0,j=jz,z=q[jz];j>0;i++,j--) {
89 iq[i] = (__int32_t)(z-two8*fw);
100 i = (iq[jz-1]>>(8-q0)); n += i;
101 iq[jz-1] -= i<<(8-q0);
109 for(i=0;i<jz ;i++) { /* compute 1-q */
[all …]
/device/generic/vulkan-cereal/third-party/glm/include/glm/gtx/
Dassociated_min_max.inl21 for(length_t i = 0, n = Result.length(); i < n; ++i) local
22 Result[i] = x[i] < y[i] ? a[i] : b[i];
34 for(length_t i = 0, n = Result.length(); i < n; ++i) local
35 Result[i] = x < y ? a[i] : b[i];
47 for(length_t i = 0, n = Result.length(); i < n; ++i) local
48 Result[i] = x[i] < y[i] ? a : b;
74 for(length_t i = 0, n = Result.length(); i < n; ++i) local
75 Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);
108 for(length_t i = 0, n = Result.length(); i < n; ++i) local
110 T Test1 = min(x[i], y[i]);
[all …]
Dmatrix_query.inl10 for(length_t i = 0; result && i < m.length() ; ++i) local
11 result = isNull(m[i], epsilon);
19 for(length_t i = 0; result && i < m.length() ; ++i) local
20 result = isNull(m[i], epsilon);
28 for(length_t i = 0; result && i < m.length() ; ++i) local
29 result = isNull(m[i], epsilon);
37 for(length_t i = 0; result && i < m[0].length() ; ++i) local
39 for(length_t j = 0; result && j < i ; ++j)
40 result = abs(m[i][j]) <= epsilon;
42 result = abs(m[i][i] - 1) <= epsilon;
[all …]
/device/google/cuttlefish/host/commands/cvd/parser/
Dcf_configs_common.cpp39 for (int i = 0; i < size; i++) { in ValidateIntConfig() local
40 if (instances[i].isMember(group) && in ValidateIntConfig()
41 (instances[i][group].isMember(json_flag))) { in ValidateIntConfig()
42 int flag = instances[i][group][json_flag].asInt(); in ValidateIntConfig()
55 for (int i = 0; i < size; i++) { in ValidateIntConfigSubGroup() local
56 if (instances[i].isMember(group) && in ValidateIntConfigSubGroup()
57 (instances[i][group].isMember(subgroup)) && in ValidateIntConfigSubGroup()
58 (instances[i][group][subgroup].isMember(json_flag))) { in ValidateIntConfigSubGroup()
59 int flag = instances[i][group][subgroup][json_flag].asInt(); in ValidateIntConfigSubGroup()
72 for (int i = 0; i < size; i++) { in ValidateStringConfig() local
[all …]
/device/generic/vulkan-cereal/stream-servers/tests/
DGLTestUtils.cpp23 for (size_t i = 0; i < rowBytes; ++i) { in RowMatches() local
24 if (expected[i] != actual[i]) { in RowMatches()
26 << "row " << rowIndex << " byte " << i in RowMatches()
28 << "(" << testing::PrintToString(expected[i]) in RowMatches()
30 << "(" << testing::PrintToString(actual[i]) << ")"; in RowMatches()
42 for (int i = 0; i < height * rowLength; i += rowLength) { in ImageMatches() local
45 i / rowLength, rowBytes, expected + i * bpp, actual + i * bpp); in ImageMatches()
50 << (i / rowLength); in ImageMatches()
74 for (int i = 0; i < height; i++) { in createTestPatternRGB888() local
76 res[i * bpp * width + j * bpp + 0] = i % 0x100; in createTestPatternRGB888()
[all …]
/device/generic/vulkan-cereal/third-party/glm/include/glm/detail/
Dfunc_vector_relational.inl14 for(length_t i = 0; i < x.length(); ++i) local
15 Result[i] = x[i] < y[i];
26 for(length_t i = 0; i < x.length(); ++i) local
27 Result[i] = x[i] <= y[i];
37 for(length_t i = 0; i < x.length(); ++i) local
38 Result[i] = x[i] > y[i];
48 for(length_t i = 0; i < x.length(); ++i) local
49 Result[i] = x[i] >= y[i];
59 for(length_t i = 0; i < x.length(); ++i) local
60 Result[i] = x[i] == y[i];
[all …]
/device/google/cuttlefish/host/commands/cvd_import_locations/unittest/
Dkml_parser_test.cc174 for (unsigned i = 0; i < locations.size(); ++i) { in TEST() local
175 EXPECT_FLOAT_EQ(-122.084075, locations[i].longitude); in TEST()
176 EXPECT_FLOAT_EQ(37.4220033612141, locations[i].latitude); in TEST()
177 EXPECT_FLOAT_EQ(50, locations[i].elevation); in TEST()
198 for (unsigned i = 0; i < locations.size(); ++i) { in TEST() local
199 EXPECT_FLOAT_EQ(-122.084075, locations[i].longitude); in TEST()
200 EXPECT_FLOAT_EQ(37.4220033612141, locations[i].latitude); in TEST()
201 EXPECT_FLOAT_EQ(50, locations[i].elevation); in TEST()
327 for (unsigned i = 0; i < locations.size(); ++i) { in TEST() local
328 EXPECT_EQ("Simple placemark", locations[i].name); in TEST()
[all …]
/device/generic/goldfish-opengl/system/vulkan_enc/
DDescriptorSetVirtualization.cpp33 for (uint32_t i = 0; i < layoutBindings.size(); ++i) { in initDescriptorWriteTable() local
34 if (layoutBindings[i].binding > highestBindingNumber) { in initDescriptorWriteTable()
35 highestBindingNumber = layoutBindings[i].binding; in initDescriptorWriteTable()
41 for (uint32_t i = 0; i < layoutBindings.size(); ++i) { in initDescriptorWriteTable() local
42 countsEachBinding[layoutBindings[i].binding] = in initDescriptorWriteTable()
43 layoutBindings[i].descriptorCount; in initDescriptorWriteTable()
48 for (uint32_t i = 0; i < table.size(); ++i) { in initDescriptorWriteTable() local
49 table[i].resize(countsEachBinding[i]); in initDescriptorWriteTable()
51 for (uint32_t j = 0; j < countsEachBinding[i]; ++j) { in initDescriptorWriteTable()
52 table[i][j].type = DescriptorWriteType::Empty; in initDescriptorWriteTable()
[all …]
/device/google/contexthub/firmware/os/core/
Dbl.c131 uint32_t offset, i, j = 0; in blProgramFlash() local
143 for (i = 0; i < sector_cnt; i++) { in blProgramFlash()
144 if (dst >= mBlFlashTable[i].address && in blProgramFlash()
145 dst < (mBlFlashTable[i].address + mBlFlashTable[i].length)) { in blProgramFlash()
153 offset = (uint32_t)(dst - mBlFlashTable[i].address); in blProgramFlash()
154 ptr = mBlFlashTable[i].address; in blProgramFlash()
155 while (j < length && i < sector_cnt) { in blProgramFlash()
156 if (offset == mBlFlashTable[i].length) { in blProgramFlash()
157 i++; in blProgramFlash()
159 ptr = mBlFlashTable[i].address; in blProgramFlash()
[all …]
/device/linaro/poplar/wifi/wifi_hal/
Dcommon.cpp132 for (int i = 0; i < info->num_event_cb; i++) { in wifi_unregister_handler() local
133 if (info->event_cb[i].nl_cmd == cmd) { in wifi_unregister_handler()
135 info->event_cb[i].cb_arg, info->event_cb[i].cb_func, cmd, i); in wifi_unregister_handler()
137 memmove(&info->event_cb[i], &info->event_cb[i+1], in wifi_unregister_handler()
138 (info->num_event_cb - i - 1) * sizeof(cb_info)); in wifi_unregister_handler()
153 for (int i = 0; i < info->num_event_cb; i++) { in wifi_unregister_vendor_handler() local
155 if (info->event_cb[i].nl_cmd == NL80211_CMD_VENDOR in wifi_unregister_vendor_handler()
156 && info->event_cb[i].vendor_id == id in wifi_unregister_vendor_handler()
157 && info->event_cb[i].vendor_subcmd == subcmd) { in wifi_unregister_vendor_handler()
159 info->event_cb[i].cb_arg, info->event_cb[i].cb_func, id, subcmd, i); in wifi_unregister_vendor_handler()
[all …]
/device/google/contexthub/firmware/os/algos/calibration/over_temp/
Dover_temp_cal.c326 for (size_t i = 0; i < 3; i++) { in overTempCalSetModel() local
327 if (isValidOtcLinearModel(over_temp_cal, temp_sensitivity[i], in overTempCalSetModel()
328 sensor_intercept[i])) { in overTempCalSetModel()
329 over_temp_cal->temp_sensitivity[i] = temp_sensitivity[i]; in overTempCalSetModel()
330 over_temp_cal->sensor_intercept[i] = sensor_intercept[i]; in overTempCalSetModel()
445 for (size_t i = 0; i < over_temp_cal->num_model_pts; i++) { in overTempCalSetModelData() local
446 if (isValidOtcOffset(model_data[i].offset, in overTempCalSetModelData()
447 model_data[i].offset_temp_celsius)) { in overTempCalSetModelData()
448 memcpy(&over_temp_cal->model_data[i], &model_data[i], in overTempCalSetModelData()
624 for (size_t i = 0; i < over_temp_cal->num_model_pts; i++) { in overTempCalUpdateSensorEstimate() local
[all …]
/device/google/contexthub/util/sensortest/
Dsensortest.cpp54 for (int i = 0; i < mNumSensors; i++) { in printSensorList() local
73 for (int i = 0; i < mNumSensors; i++) { in findSensorTypeInSensorList() local
74 if (ASensor_getType(mSensorList[i]) == type) { in findSensorTypeInSensorList()
75 return i; in findSensorTypeInSensorList()
84 for (int i = 0; i < mNumSensorConfigs; i++) { in findSensorTypeInConfigList() local
85 if (mSensorConfigList[i].type == type) { in findSensorTypeInConfigList()
86 return i; in findSensorTypeInConfigList()
187 for (int i = 0; i < mNumSensorConfigs; i++) { in hasReceivedAllEvents() local
188 if (!mSensorConfigList[i].receivedEvent) { in hasReceivedAllEvents()
215 for (int i = 0; i < mNumSensorConfigs; i++) { in main() local
[all …]
/device/google/contexthub/util/nanoapp_sign/
Dnanoapp_sign.c33 for (int i=0; i < 4; ++i, x >>= 8) in bswap32() local
49 int c, i; in getHexEncodedByte() local
54 for (i = 0; i < 2; i++) { in getHexEncodedByte()
68 … else if (i) //disallow everything between first and second nibble in getHexEncodedByte()
86 uint32_t i, v; in rand32_no_zero_bytes() local
97 for (v = 0, i = 0; i < 4; i++) { in rand32_no_zero_bytes()
126 int i; in validateSignature() local
130 for (i = 0; i < RSA_LIMBS; i++) in validateSignature()
131 rsa->num[i] = le32toh(le32SigPack[i]); in validateSignature()
164 for (i = 9; i < RSA_LIMBS - 1; i++) { in validateSignature()
[all …]
/device/generic/goldfish-opengl/android-emu/aemu/base/
Daddress_space.h110 int i; in address_space_allocator_find_available_block() local
114 for (i = 0; i < n_blocks; ++i, ++block) { in address_space_allocator_find_available_block()
120 index = i; in address_space_allocator_find_available_block()
148 int i, in address_space_allocator_split_block() argument
154 address_space_assert(i >= 0); in address_space_allocator_split_block()
155 address_space_assert(i < allocator->size); in address_space_allocator_split_block()
156 address_space_assert(size < allocator->blocks[i].size); in address_space_allocator_split_block()
175 memmove(&blocks[i + 2], &blocks[i + 1], in address_space_allocator_split_block()
176 sizeof(struct address_block) * (allocator->size - i - 1)); in address_space_allocator_split_block()
178 struct address_block *to_borrow_from = &blocks[i]; in address_space_allocator_split_block()
[all …]
/device/google/cuttlefish/host/libs/audio_connector/
Dcommands.cpp46 for (int i = 0; i < reply.size(); ++i) { in Reply() local
47 info_reply()[i] = reply[i]; in Reply()
65 for (int i = 0; i < reply.size(); ++i) { in Reply() local
66 info_reply()[i].hdr.hda_fn_nid = Le32(reply[i].hdr.hda_fn_nid); in Reply()
67 info_reply()[i].direction = reply[i].direction; in Reply()
68 auto channels = std::min(VIRTIO_SND_CHMAP_MAX_SIZE, reply[i].channels); in Reply()
69 info_reply()[i].channels = channels; in Reply()
71 info_reply()[i].positions[j] = reply[i].positions[j]; in Reply()
90 for (int i = 0; i < reply.size(); ++i) { in Reply() local
91 info_reply()[i].hdr.hda_fn_nid = Le32(reply[i].hdr.hda_fn_nid); in Reply()
[all …]
/device/generic/vulkan-cereal/third-party/stb/include/stb/
Dstb_image_write.h454 int i,j, j_end; in stbiw__write_pixels() local
469 for (i=0; i < x; ++i) { in stbiw__write_pixels()
470 unsigned char *d = (unsigned char *) data + (j*x+i)*comp; in stbiw__write_pixels()
545 int i,j,k; in stbi_write_tga_core() local
563 for (i = 0; i < x; i += len) { in stbi_write_tga_core()
564 unsigned char *begin = row + i * comp; in stbi_write_tga_core()
568 if (i < x - 1) { in stbi_write_tga_core()
570 diff = memcmp(begin, row + (i + 1) * comp, comp); in stbi_write_tga_core()
573 for (k = i + 2; k < x && len < 128; ++k) { in stbi_write_tga_core()
583 for (k = i + 2; k < x && len < 128; ++k) { in stbi_write_tga_core()
[all …]

12345678910>>...30