/external/mesa3d/src/compiler/nir/ |
D | nir_opt_shrink_vectors.c | 79 if (def->num_components == 1) in shrink_dest_to_read_mask() 110 assert(rounded <= def->num_components); in shrink_dest_to_read_mask() 112 if ((def->num_components > rounded) || first_bit > 0) { in shrink_dest_to_read_mask() 113 def->num_components = rounded; in shrink_dest_to_read_mask() 158 if (last_bit == instr->def.num_components) in shrink_intrinsic_to_non_sparse() 161 instr->def.num_components -= 1; in shrink_intrinsic_to_non_sparse() 162 instr->num_components = instr->def.num_components; in shrink_intrinsic_to_non_sparse() 198 unsigned num_components = 0; in opt_shrink_vector() local 199 for (unsigned i = 0; i < def->num_components; i++) { in opt_shrink_vector() 207 for (j = 0; j < num_components; j++) { in opt_shrink_vector() [all …]
|
D | nir_search_helpers.h | 38 unsigned src, unsigned num_components, in is_pos_power_of_two() argument 45 for (unsigned i = 0; i < num_components; i++) { in is_pos_power_of_two() 70 unsigned src, unsigned num_components, in is_neg_power_of_two() argument 79 for (unsigned i = 0; i < num_components; i++) { in is_neg_power_of_two() 99 unsigned src, unsigned num_components, in is_bitcount2() argument 106 for (unsigned i = 0; i < num_components; i++) { in is_bitcount2() 117 unsigned src, unsigned num_components, const uint8_t *swizzle) in is_nan() argument 123 for (unsigned i = 0; i < num_components; i++) { in is_nan() 133 unsigned src, unsigned num_components, const uint8_t *swizzle) in is_negative_zero() argument 139 for (unsigned i = 0; i < num_components; i++) { in is_negative_zero() [all …]
|
D | nir_lower_mem_access_bit_sizes.c | 34 unsigned num_components, unsigned bit_size) in dup_mem_intrinsic() argument 54 dup->num_components = num_components; in dup_mem_intrinsic() 61 nir_def_init(&dup->instr, &dup->def, num_components, bit_size); in dup_mem_intrinsic() 63 nir_intrinsic_set_write_mask(dup, (1 << num_components) - 1); in dup_mem_intrinsic() 77 for (; i < load->num_components - 1; i++) in shift_load_data_alignbyte_amd() 83 return nir_vec(b, comps, load->num_components); in shift_load_data_alignbyte_amd() 92 for (unsigned i = 0; i < load->num_components - 1; i++) { in shift_load_data_shift64() 97 if (i == load->num_components - 2) in shift_load_data_shift64() 101 return nir_vec(b, comps, load->num_components); in shift_load_data_shift64() 112 if (load->num_components > 1) { in shift_load_data_scalar() [all …]
|
D | nir_lower_ubo_vec4.c | 77 unsigned bit_size, unsigned num_components) in create_load() argument 79 nir_def *def = nir_load_ubo_vec4(b, num_components, bit_size, block, offset); in create_load() 106 unsigned num_components = intr->num_components; in nir_lower_ubo_vec4_lower() local 108 align_offset + chan_size_bytes * num_components <= 16); in nir_lower_ubo_vec4_lower() 110 num_components = chans_per_vec4; in nir_lower_ubo_vec4_lower() 114 num_components); in nir_lower_ubo_vec4_lower() 126 } else if (intr->num_components == 1) { in nir_lower_ubo_vec4_lower() 137 align_offset + chan_size_bytes * intr->num_components <= 8) { in nir_lower_ubo_vec4_lower() 142 BITSET_MASK(intr->num_components) << (align_chan_offset); in nir_lower_ubo_vec4_lower() 155 num_components); in nir_lower_ubo_vec4_lower() [all …]
|
D | nir_builder.h | 281 nir_undef(nir_builder *build, unsigned num_components, unsigned bit_size) in nir_undef() argument 284 nir_undef_instr_create(build->shader, num_components, bit_size); in nir_undef() 294 nir_build_imm(nir_builder *build, unsigned num_components, in nir_build_imm() argument 298 nir_load_const_instr_create(build->shader, num_components, bit_size); in nir_build_imm() 302 memcpy(load_const->value, value, sizeof(nir_const_value) * num_components); in nir_build_imm() 310 nir_imm_zero(nir_builder *build, unsigned num_components, unsigned bit_size) in nir_imm_zero() argument 313 nir_load_const_instr_create(build->shader, num_components, bit_size); in nir_imm_zero() 522 unsigned num_components, unsigned bit_size); 623 nir_vec(nir_builder *build, nir_def **comp, unsigned num_components) in nir_vec() argument 625 return nir_build_alu_src_arr(build, nir_op_vec(num_components), comp); in nir_vec() [all …]
|
D | nir_format_convert.c | 35 for (unsigned i = 0; i < src->num_components; i++) { in nir_format_mask_uvec() 39 return nir_iand(b, src, nir_build_imm(b, src->num_components, 32, mask)); in nir_format_mask_uvec() 46 assert(src->num_components <= 4); in nir_format_sign_extend_ivec() 48 for (unsigned i = 0; i < src->num_components; i++) { in nir_format_sign_extend_ivec() 53 return nir_vec(b, comps, src->num_components); in nir_format_sign_extend_ivec() 58 const unsigned *bits, unsigned num_components, in nir_format_unpack_int() argument 61 assert(num_components >= 1 && num_components <= 4); in nir_format_unpack_int() 67 assert(num_components == 1); in nir_format_unpack_int() 73 for (unsigned i = 0; i < num_components; i++) { in nir_format_unpack_int() 95 return nir_vec(b, comps, num_components); in nir_format_unpack_int() [all …]
|
D | nir_lower_array_deref_of_vec.c | 73 assert(intrin->num_components == 1); in nir_lower_array_deref_of_vec_impl() 74 unsigned num_components = glsl_get_components(vec_deref->type); in nir_lower_array_deref_of_vec_impl() local 75 assert(num_components > 1 && num_components <= NIR_MAX_VEC_COMPONENTS); in nir_lower_array_deref_of_vec_impl() 90 if (index < num_components) in nir_lower_array_deref_of_vec_impl() 98 0, num_components); in nir_lower_array_deref_of_vec_impl() 116 intrin->def.num_components = num_components; in nir_lower_array_deref_of_vec_impl() 117 intrin->num_components = num_components; in nir_lower_array_deref_of_vec_impl()
|
D | nir_lower_vec_to_regs.c | 35 unsigned num_components = vec->def.num_components; in insert_store() local 36 assert(num_components == nir_op_infos[vec->op].num_inputs); in insert_store() 40 for (unsigned i = start_idx; i < num_components; i++) { in insert_store() 52 nir_build_store_reg(b, nir_swizzle(b, src, swiz, num_components), reg, in insert_store() 128 unsigned dest_components = vec->def.num_components; in try_coalesce() 201 unsigned num_components = vec->def.num_components; in lower() local 207 for (unsigned i = 1; i < num_components; ++i) { in lower() 218 nir_def *reg = nir_decl_reg(b, num_components, in lower() 222 for (unsigned i = 0; i < num_components; i++) { in lower() 237 for (unsigned i = 0; i < num_components; ++i) { in lower() [all …]
|
D | nir_lower_calls_to_builtins.c | 40 nir_component_mask(res->num_components)); in lower_builtin_alu() 67 intr->num_components = intr->src[s].ssa->num_components; in lower_builtin_intr() 80 unsigned num_components = MAX2(glsl_get_length(deref->type), 1); in lower_builtin_intr() local 82 nir_def_init(&intr->instr, &intr->def, num_components, bit_size); in lower_builtin_intr() 83 nir_store_deref(b, deref, &intr->def, nir_component_mask(num_components)); in lower_builtin_intr() 85 if (info.dest_components == 0 && intr->num_components == 0) { in lower_builtin_intr() 86 intr->num_components = num_components; in lower_builtin_intr()
|
D | nir_trivialize_registers.c | 246 unsigned num_components = nir_intrinsic_num_components(decl); in clear_reg_stores() local 248 for (unsigned c = 0; c < num_components; c++) { in clear_reg_stores() 252 clear_store(stores[c], num_components, stores); in clear_reg_stores() 272 unsigned num_components = nir_intrinsic_num_components(decl); in trivialize_store() local 275 for (unsigned c = 0; c < num_components; c++) { in trivialize_store() 286 clear_store(store, num_components, stores); in trivialize_store() 303 unsigned num_components = nir_intrinsic_num_components(decl); in trivialize_reg_stores() local 306 assert(c < num_components); in trivialize_reg_stores() 311 clear_store(stores[c], num_components, stores); in trivialize_reg_stores() 325 unsigned nr = load->def.num_components; in trivialize_read_after_write() [all …]
|
/external/mesa3d/src/broadcom/compiler/ |
D | v3d_nir_lower_image_load_store.c | 71 int num_components, bool mask) in pack_bits() argument 75 for (int i = 0; i < num_components; i++) { in pack_bits() 154 unsigned num_components, in pack_8bit() argument 167 nir_channel(b, color, num_components == 1 ? 0 : 1)); in pack_8bit() 170 nir_channel(b, color, num_components == 1 ? 0 : 1)); in pack_8bit() 175 if (num_components == 4) { in pack_8bit() 199 unsigned num_components, in pack_16bit() argument 205 for (unsigned i = 0; i < num_components; i++) { in pack_16bit() 224 switch (num_components) { in pack_16bit() 238 return nir_vec(b, results, DIV_ROUND_UP(num_components, 2)); in pack_16bit() [all …]
|
D | v3d_nir_lower_load_store_bitsize.c | 58 new_intr->num_components = 1; in init_scalar_intrinsic() 139 .num_components = 1, in v3d_size_align_cb() 166 unsigned num_components; in v3d_size_align_cb() local 168 num_components = MIN2(bytes / 4, 4); in v3d_size_align_cb() 173 num_components = MIN2(align / 4, num_components); in v3d_size_align_cb() 175 num_components = 1; in v3d_size_align_cb() 179 .num_components = num_components, in v3d_size_align_cb() 181 .align = (bit_size / 8) * (num_components == 3 ? 4 : num_components), in v3d_size_align_cb()
|
/external/mesa3d/src/gallium/drivers/r600/sfn/ |
D | sfn_nir_legalize_image_load_store.cpp | 29 nir_imm_zero(b, ir->def.num_components, ir->def.bit_size); in r600_legalize_image_load_store_impl() 49 unsigned num_components = 2; in r600_legalize_image_load_store_impl() local 53 num_components = 1; in r600_legalize_image_load_store_impl() 59 num_components = 2; in r600_legalize_image_load_store_impl() 62 num_components = 3; in r600_legalize_image_load_store_impl() 68 if (num_components < 3 && nir_intrinsic_image_array(ir)) in r600_legalize_image_load_store_impl() 69 num_components++; in r600_legalize_image_load_store_impl() 72 num_components, in r600_legalize_image_load_store_impl() 82 unsigned mask = (1 << num_components) - 1; in r600_legalize_image_load_store_impl() 83 unsigned num_src1_comp = MIN2(ir->src[1].ssa->num_components, num_components); in r600_legalize_image_load_store_impl() [all …]
|
D | sfn_nir_lower_64bit.cpp | 102 int old_components = intr->def.num_components; in lower() 104 intr->def.num_components *= 2; in lower() 106 intr->num_components *= 2; in lower() 153 return phi->def.num_components == 64; in filter() 231 &phi_lo->instr, &phi_lo->def, phi->def.num_components * 2, 32); in lower() 233 &phi_hi->instr, &phi_hi->def, phi->def.num_components * 2, 32); in lower() 270 return intr->def.num_components >= 3; in filter() 287 if (alu->def.num_components < 3) in filter() 309 return lc->def.num_components >= 3; in filter() 515 unsigned old_components = load1->def.num_components; in split_double_load() [all …]
|
/external/mesa3d/src/compiler/nir/tests/ |
D | opt_shrink_vectors_tests.cpp | 92 alu_result->num_components = 1; in TEST_F() 100 ASSERT_TRUE(imm_vec->num_components == 1); in TEST_F() 123 alu_result->num_components = 4; in TEST_F() 129 alu2_result->num_components = 1; in TEST_F() 138 ASSERT_TRUE(alu_result->num_components == 1); in TEST_F() 162 alu_result->num_components = 4; in TEST_F() 177 ASSERT_TRUE(imm_vec->num_components == 2); in TEST_F() 182 ASSERT_TRUE(alu_result->num_components == 2); in TEST_F() 227 alu_result->num_components = 8; in TEST_F() 242 ASSERT_TRUE(imm_vec->num_components == 8); in TEST_F() [all …]
|
D | builder_tests.cpp | 33 case 8: return glsl_u8vec_type(def->num_components); in type_for_def() 34 case 16: return glsl_u16vec_type(def->num_components); in type_for_def() 35 case 32: return glsl_uvec_type(def->num_components); in type_for_def() 36 case 64: return glsl_u64vec_type(def->num_components); in type_for_def() 53 store->num_components = val->num_components; in store_test_val() 56 nir_intrinsic_set_write_mask(store, ((1 << val->num_components) - 1)); in store_test_val()
|
/external/tensorflow/tensorflow/core/grappler/utils/ |
D | scc.cc | 128 int* num_components) { in StronglyConnectedComponents() argument 156 *num_components = 0; in StronglyConnectedComponents() 161 StrongConnect(&v, &stack, &index, components, num_components); in StronglyConnectedComponents() 165 std::vector<int> counts_per_component(*num_components, 0); in StronglyConnectedComponents() 168 DCHECK(component.second < *num_components); in StronglyConnectedComponents() 175 (*num_components)--; in StronglyConnectedComponents() 180 (*num_components) += 1; in StronglyConnectedComponents() 186 int num_components = 0; in IdentifyLoops() local 188 StronglyConnectedComponents(graph, &components, &num_components); in IdentifyLoops() 189 if (num_components <= 1) { in IdentifyLoops() [all …]
|
D | scc_test.cc | 62 int num_components; in TEST_F() local 63 StronglyConnectedComponents(item.graph, &components, &num_components); in TEST_F() 65 EXPECT_EQ(num_components, 1); in TEST_F() 92 int num_components; in TEST_F() local 94 StronglyConnectedComponents(graph, &components, &num_components); in TEST_F() 96 EXPECT_EQ(num_components, 2); in TEST_F() 155 int num_components; in TEST_F() local 157 StronglyConnectedComponents(graph, &components, &num_components); in TEST_F() 159 EXPECT_EQ(num_components, 4); in TEST_F() 391 int num_components; in TEST_F() local [all …]
|
/external/mesa3d/src/gallium/drivers/lima/ir/ |
D | lima_nir_split_load_input.c | 52 for (i = 1; i < alu->def.num_components; i++) in lima_nir_split_load_input_instr() 56 if (i != alu->def.num_components) in lima_nir_split_load_input_instr() 60 if (alu->def.num_components == 3 && swizzle > 0) in lima_nir_split_load_input_instr() 64 if (alu->def.num_components == 2 && in lima_nir_split_load_input_instr() 73 alu->def.num_components, ssa->bit_size); in lima_nir_split_load_input_instr() 74 new_intrin->num_components = alu->def.num_components; in lima_nir_split_load_input_instr()
|
/external/tensorflow/tensorflow/core/kernels/ |
D | ragged_tensor_to_variant_op.cc | 45 auto num_components = values_shape.dim_size(0); in UnbatchDenseZerothDim() local 49 ragged_components->resize(num_components); in UnbatchDenseZerothDim() 52 for (auto i = decltype(num_components){}; i < num_components; i++) { in UnbatchDenseZerothDim() 76 auto num_components = batched_splits_top_vec.size() - 1; in UnbatchRaggedZerothDim() local 78 if (num_components < 0) { in UnbatchRaggedZerothDim() 83 ragged_components->resize(num_components); in UnbatchRaggedZerothDim() 96 for (auto i = decltype(num_components){}; i < num_components; i++) { in UnbatchRaggedZerothDim() 121 std::vector<SPLIT_TYPE> ragged_component_values_size(num_components, 0); in UnbatchRaggedZerothDim() 122 for (auto i = decltype(num_components){}; i < num_components; i++) { in UnbatchRaggedZerothDim() 155 for (auto i = decltype(num_components){}; i < num_components; i++) { in UnbatchRaggedZerothDim() [all …]
|
/external/mesa3d/src/intel/compiler/ |
D | intel_nir_lower_sparse.c | 84 intrin->num_components - 1, in lower_sparse_image_load() 94 intrin->num_components - 1, in lower_sparse_image_load() 110 for (unsigned i = 0; i < intrin->num_components - 1; i++) { in lower_sparse_image_load() 164 dests[intrin->num_components - 1] = nir_channel(b, &tex->def, 4); in lower_sparse_image_load() 168 nir_vec(b, dests, intrin->num_components)); in lower_sparse_image_load() 179 tex->def.num_components, tex->def.bit_size); in lower_tex_compare() 187 tex->def.num_components = tex->def.num_components - 1; in lower_tex_compare() 190 for (unsigned i = 0; i < tex->def.num_components; i++) in lower_tex_compare() 192 new_comps[tex->def.num_components] = in lower_tex_compare() 193 nir_channel(b, &sparse_tex->def, tex->def.num_components); in lower_tex_compare() [all …]
|
D | brw_nir_lower_storage_image.c | 124 assert(color->num_components <= dest_components); in convert_color_for_load() 125 if (color->num_components == dest_components) in convert_color_for_load() 129 for (unsigned i = 0; i < color->num_components; i++) in convert_color_for_load() 132 for (unsigned i = color->num_components; i < 3; i++) in convert_color_for_load() 135 if (color->num_components < 4) { in convert_color_for_load() 164 sparse ? (intrin->num_components - 1) : intrin->num_components; in lower_image_load_instr() 172 intrin->num_components = isl_format_get_num_channels(lower_fmt); in lower_image_load_instr() 173 intrin->def.num_components = intrin->num_components; in lower_image_load_instr() 182 intrin->num_components++; in lower_image_load_instr() 183 intrin->def.num_components = intrin->num_components; in lower_image_load_instr() [all …]
|
D | brw_nir_lower_cooperative_matrix.c | 242 const unsigned num_components = glsl_get_vector_elements(slice->type); in lower_cmat_load_store() local 324 for (unsigned i = 0; i < num_components; i++) { in lower_cmat_load_store() 350 for (unsigned i = 0; i < num_components; i++) { in lower_cmat_load_store() 385 nir_store_deref(b, slice, nir_vec(b, results, num_components), in lower_cmat_load_store() 386 nir_component_mask(num_components)); in lower_cmat_load_store() 396 const unsigned num_components = glsl_get_vector_elements(dst_slice->type); in lower_cmat_unary_op() local 434 for (unsigned i = 0; i < num_components; i++) { in lower_cmat_unary_op() 449 nir_store_deref(b, dst_slice, nir_vec(b, results, num_components), in lower_cmat_unary_op() 450 nir_component_mask(num_components)); in lower_cmat_unary_op() 464 const unsigned num_components = glsl_get_vector_elements(dst_slice->type); in lower_cmat_binary_op() local [all …]
|
/external/mesa3d/src/intel/compiler/elk/ |
D | elk_nir_lower_storage_image.c | 42 load->num_components = 2; in _load_image_param() 46 load->num_components = 3; in _load_image_param() 49 load->num_components = 4; in _load_image_param() 54 nir_def_init(&load->instr, &load->def, load->num_components, 32); in _load_image_param() 117 nir_def *xypos = (coord->num_components == 1) ? in image_address() 143 if (coord->num_components > 2) { in image_address() 160 if (coord->num_components > 1) { in image_address() 341 assert(color->num_components <= dest_components); in convert_color_for_load() 342 if (color->num_components == dest_components) in convert_color_for_load() 346 for (unsigned i = 0; i < color->num_components; i++) in convert_color_for_load() [all …]
|
/external/mesa3d/src/amd/common/nir/ |
D | ac_nir.c | 136 unsigned num_components = ac_args->args[arg_index].size; in ac_nir_load_arg_at_offset() local 139 return nir_undef(b, num_components, 32); in ac_nir_load_arg_at_offset() 142 return nir_load_scalar_arg_amd(b, num_components, .base = arg_index); in ac_nir_load_arg_at_offset() 144 return nir_load_vector_arg_amd(b, num_components, .base = arg_index); in ac_nir_load_arg_at_offset() 266 unsigned num_components) in ac_optimization_barrier_vgpr_array() argument 277 unsigned prev_num = array[i]->num_components; in ac_optimization_barrier_vgpr_array() 278 array[i] = nir_trim_vector(b, array[i], num_components); in ac_optimization_barrier_vgpr_array() 286 ac_get_global_ids(nir_builder *b, unsigned num_components, unsigned bit_size) in ac_get_global_ids() argument 288 unsigned mask = BITFIELD_MASK(num_components); in ac_get_global_ids() 354 if (alu->def.num_components > 1) in ac_nir_lower_bit_size_callback() [all …]
|