Home
last modified time | relevance | path

Searched refs:bit_size (Results 1 – 25 of 211) sorted by relevance

123456789

/external/mesa3d/src/compiler/nir/
Dnir_lower_bool_to_bitsize.c30 assert(def->bit_size > 1); in assert_ssa_def_is_not_1bit()
38 if (def->bit_size == 1) { in rewrite_1bit_ssa_def_to_32bit()
39 def->bit_size = 32; in rewrite_1bit_ssa_def_to_32bit()
64 uint32_t bit_size = nir_src_bit_size(alu->src[start_idx].src); in make_sources_canonical() local
66 if (nir_src_bit_size(alu->src[i].src) != bit_size) { in make_sources_canonical()
68 nir_op convert_op = get_bool_convert_opcode(bit_size); in make_sources_canonical()
146 uint32_t bit_size = nir_src_bit_size(alu->src[0].src); in lower_alu_instr() local
147 assert(bit_size > 1); in lower_alu_instr()
165 opcode = bit_size == 8 ? nir_op_f2b8 : in lower_alu_instr()
166 bit_size == 16 ? nir_op_f2b16 : nir_op_f2b32; in lower_alu_instr()
[all …]
Dnir_lower_system_values.c35 const unsigned bit_size = intrin->dest.ssa.bit_size; in sanitize_32bit_sysval() local
36 if (bit_size == 32) in sanitize_32bit_sysval()
39 intrin->dest.ssa.bit_size = 32; in sanitize_32bit_sysval()
40 return nir_u2u(b, &intrin->dest.ssa, bit_size); in sanitize_32bit_sysval()
44 build_global_group_size(nir_builder *b, unsigned bit_size) in build_global_group_size() argument
47 nir_ssa_def *num_work_groups = nir_load_num_work_groups(b, bit_size); in build_global_group_size()
48 return nir_imul(b, nir_u2u(b, group_size, bit_size), in build_global_group_size()
68 const unsigned bit_size = intrin->dest.ssa.bit_size; in lower_system_value_instr() local
159 return build_global_group_size(b, bit_size); in lower_system_value_instr()
205 intrin->dest.ssa.bit_size); in lower_system_value_instr()
[all …]
Dnir_conversion_builder.h61 unsigned src_bit_size = src->bit_size; in nir_round_float_to_float()
96 return nir_bcsel(b, nir_flt(b, src, nir_imm_zero(b, 1, src->bit_size)), in nir_round_float_to_float()
131 if (src->bit_size < mantissa_bits) in nir_round_int_to_float()
136 nir_i2b1(b, nir_ishr(b, src, nir_imm_int(b, src->bit_size - 1))); in nir_round_int_to_float()
141 nir_imm_intN_t(b, (1ull << (src->bit_size - 1)) - 1, src->bit_size); in nir_round_int_to_float()
167 nir_ssa_def *one = nir_imm_intN_t(b, 1, src->bit_size); in nir_round_int_to_float()
234 nir_alu_type_get_type_size(src_type) == src->bit_size); in nir_clamp_to_type_range()
235 src_type |= src->bit_size; in nir_clamp_to_type_range()
259 low = nir_imm_intN_t(b, ilow, src->bit_size); in nir_clamp_to_type_range()
260 high = nir_imm_intN_t(b, ihigh, src->bit_size); in nir_clamp_to_type_range()
[all …]
Dnir_lower_subgroups.c57 assert(intrin->src[0].ssa->bit_size == 64); in lower_subgroup_op_to_32bit()
64 ballot_type_to_uint(nir_builder *b, nir_ssa_def *value, unsigned bit_size) in ballot_type_to_uint() argument
67 assert(value->num_components == 4 && value->bit_size == 32); in ballot_type_to_uint()
69 if (bit_size == 32) { in ballot_type_to_uint()
72 assert(bit_size == 64); in ballot_type_to_uint()
81 unsigned num_components, unsigned bit_size) in uint_to_ballot_type() argument
84 assert(value->bit_size == 32 || value->bit_size == 64); in uint_to_ballot_type()
90 assert(bit_size == 32); in uint_to_ballot_type()
92 if (value->bit_size == 32) { in uint_to_ballot_type()
95 assert(value->bit_size == 64); in uint_to_ballot_type()
[all …]
Dnir_builder.h209 assert(then_def->bit_size == else_def->bit_size); in nir_if_phi()
211 then_def->num_components, then_def->bit_size, NULL); in nir_if_phi()
240 nir_ssa_undef(nir_builder *build, unsigned num_components, unsigned bit_size) in nir_ssa_undef() argument
243 nir_ssa_undef_instr_create(build->shader, num_components, bit_size); in nir_ssa_undef()
256 unsigned bit_size, const nir_const_value *value) in nir_build_imm() argument
259 nir_load_const_instr_create(build->shader, num_components, bit_size); in nir_build_imm()
271 nir_imm_zero(nir_builder *build, unsigned num_components, unsigned bit_size) in nir_imm_zero() argument
274 nir_load_const_instr_create(build->shader, num_components, bit_size); in nir_imm_zero()
284 nir_imm_boolN_t(nir_builder *build, bool x, unsigned bit_size) in nir_imm_boolN_t() argument
286 nir_const_value v = nir_const_value_for_bool(x, bit_size); in nir_imm_boolN_t()
[all …]
Dnir_opt_idiv_const.c33 return nir_imm_intN_t(b, 0, n->bit_size); in build_udiv()
38 util_compute_fast_udiv_info(d, n->bit_size, n->bit_size); in build_udiv()
43 n = nir_uadd_sat(b, n, nir_imm_intN_t(b, m.increment, n->bit_size)); in build_udiv()
44 n = nir_umul_high(b, n, nir_imm_intN_t(b, m.multiplier, n->bit_size)); in build_udiv()
56 return nir_imm_intN_t(b, 0, n->bit_size); in build_umod()
58 return nir_iand(b, n, nir_imm_intN_t(b, d - 1, n->bit_size)); in build_umod()
61 nir_imm_intN_t(b, d, n->bit_size))); in build_umod()
71 return nir_imm_intN_t(b, 0, n->bit_size); in build_idiv()
78 nir_ssa_def *n_neg = nir_ilt(b, n, nir_imm_intN_t(b, 0, n->bit_size)); in build_idiv()
83 util_compute_fast_sdiv_info(d, n->bit_size); in build_idiv()
[all …]
Dnir_lower_bit_size.c34 nir_alu_type type, unsigned bit_size) in convert_to_bit_size() argument
38 if ((type & (nir_type_uint | nir_type_int)) && bit_size == 32 && in convert_to_bit_size()
45 return nir_convert_to_bit_size(bld, src, type, bit_size); in convert_to_bit_size()
49 lower_alu_instr(nir_builder *bld, nir_alu_instr *alu, unsigned bit_size) in lower_alu_instr() argument
52 unsigned dst_bit_size = alu->dest.dest.ssa.bit_size; in lower_alu_instr()
63 src = convert_to_bit_size(bld, src, type, bit_size); in lower_alu_instr()
76 assert(dst_bit_size * 2 <= bit_size); in lower_alu_instr()
89 dst_bit_size != bit_size) { in lower_alu_instr()
100 unsigned bit_size) in lower_intrinsic_instr() argument
119 const unsigned old_bit_size = intrin->dest.ssa.bit_size; in lower_intrinsic_instr()
[all …]
Dnir_builtin_builder.c51 nir_imm_intN_t(b, 0, cross->bit_size)); in nir_cross4()
72 nir_ssa_def *zero = nir_imm_intN_t(b, 0, x->bit_size); in nir_nextafter()
73 nir_ssa_def *one = nir_imm_intN_t(b, 1, x->bit_size); in nir_nextafter()
83 nir_imm_intN_t(b, (1 << (x->bit_size - 1)) + 1, x->bit_size), in nir_nextafter()
102 nir_ssa_def *f0 = nir_imm_floatN_t(b, 0.0, vec->bit_size); in nir_normalize()
103 nir_ssa_def *f1 = nir_imm_floatN_t(b, 1.0, vec->bit_size); in nir_normalize()
104 nir_ssa_def *finf = nir_imm_floatN_t(b, INFINITY, vec->bit_size); in nir_normalize()
121 nir_ssa_def *f2 = nir_imm_floatN_t(b, 2.0, x->bit_size); in nir_smoothstep()
122 nir_ssa_def *f3 = nir_imm_floatN_t(b, 3.0, x->bit_size); in nir_smoothstep()
137 assert(lo->bit_size == hi->bit_size); in nir_upsample()
[all …]
Dnir_lower_bool_to_int32.c29 assert(def->bit_size > 1); in assert_ssa_def_is_not_1bit()
37 if (def->bit_size == 1) { in rewrite_1bit_ssa_def_to_32bit()
38 def->bit_size = 32; in rewrite_1bit_ssa_def_to_32bit()
62 if (alu->dest.dest.ssa.bit_size != 1) in lower_alu_instr()
106 assert(alu->dest.dest.ssa.bit_size > 1); in lower_alu_instr()
108 assert(alu->src[i].src.ssa->bit_size > 1); in lower_alu_instr()
112 if (alu->dest.dest.ssa.bit_size == 1) in lower_alu_instr()
113 alu->dest.dest.ssa.bit_size = 32; in lower_alu_instr()
132 if (load->def.bit_size == 1) { in nir_lower_bool_to_int32_impl()
136 load->def.bit_size = 32; in nir_lower_bool_to_int32_impl()
Dnir_lower_bool_to_float.c30 assert(def->bit_size > 1); in assert_ssa_def_is_not_1bit()
38 if (def->bit_size == 1) { in rewrite_1bit_ssa_def_to_32bit()
39 def->bit_size = 32; in rewrite_1bit_ssa_def_to_32bit()
61 if (alu->dest.dest.ssa.bit_size != 1) in lower_alu_instr()
111 assert(alu->dest.dest.ssa.bit_size > 1); in lower_alu_instr()
113 assert(alu->src[i].src.ssa->bit_size > 1); in lower_alu_instr()
122 if (alu->dest.dest.ssa.bit_size == 1) in lower_alu_instr()
123 alu->dest.dest.ssa.bit_size = 32; in lower_alu_instr()
146 if (load->def.bit_size == 1) { in nir_lower_bool_to_float_impl()
150 load->def.bit_size = 32; in nir_lower_bool_to_float_impl()
Dnir_opt_constant_folding.c60 unsigned bit_size = 0; in try_fold_alu() local
62 bit_size = alu->dest.dest.ssa.bit_size; in try_fold_alu()
68 if (bit_size == 0 && in try_fold_alu()
70 bit_size = alu->src[i].src.ssa->bit_size; in try_fold_alu()
87 if (bit_size == 0) in try_fold_alu()
88 bit_size = 32; in try_fold_alu()
99 bit_size, srcs, in try_fold_alu()
104 alu->dest.dest.ssa.bit_size, in try_fold_alu()
222 intrin->dest.ssa.bit_size, v); in try_fold_intrinsic()
247 intrin->dest.ssa.bit_size); in try_fold_intrinsic()
[all …]
Dnir_search.c201 nir_op_for_search_op(uint16_t sop, unsigned bit_size) in nir_op_for_search_op() argument
208 switch (bit_size) { \ in nir_op_for_search_op()
217 switch (bit_size) { \ in nir_op_for_search_op()
227 switch (bit_size) { \ in nir_op_for_search_op()
282 if (value->bit_size > 0 && in match_value()
283 nir_src_bit_size(instr->src[src].src) != value->bit_size) in match_value()
355 if (load->def.bit_size < 16) in match_value()
370 unsigned bit_size = nir_src_bit_size(instr->src[src].src); in match_value() local
371 uint64_t mask = bit_size == 64 ? UINT64_MAX : (1ull << bit_size) - 1; in match_value()
404 if (expr->value.bit_size > 0 && in match_expression()
[all …]
Dnir_builtin_builder.h152 uint64_t masks = 1ull << (x->bit_size - 1); in nir_copysign()
155 nir_ssa_def *s = nir_imm_intN_t(b, masks, x->bit_size); in nir_copysign()
156 nir_ssa_def *v = nir_imm_intN_t(b, maskv, x->bit_size); in nir_copysign()
172 nir_ssa_def *zero = nir_imm_floatN_t(b, 0.0, x->bit_size); in nir_fdim()
223 nir_ssa_def *nan = nir_imm_floatN_t(b, NAN, x->bit_size); in nir_nan()
244 uint64_t mask = 1ull << (s->bit_size - 1); in nir_select()
245 s = nir_iand(b, s, nir_imm_intN_t(b, mask, s->bit_size)); in nir_select()
260 val = nir_isub(b, nir_imm_intN_t(b, a->bit_size - 1, 32), nir_ufind_msb(b, a)); in nir_clz_u()
261 return nir_u2u(b, val, a->bit_size); in nir_clz_u()
267 nir_ssa_def *cond = nir_ieq(b, a, nir_imm_intN_t(b, 0, a->bit_size)); in nir_ctz_u()
[all …]
Dnir_loop_analyze.c556 basic_ind.def->bit_size); in guess_loop_limit()
586 eval_const_unop(nir_op op, unsigned bit_size, nir_const_value src0, in eval_const_unop() argument
592 nir_eval_const_opcode(op, &dest, 1, bit_size, src, execution_mode); in eval_const_unop()
597 eval_const_binop(nir_op op, unsigned bit_size, in eval_const_binop() argument
604 nir_eval_const_opcode(op, &dest, 1, bit_size, src, execution_mode); in eval_const_binop()
610 nir_const_value limit, unsigned bit_size, in get_iteration() argument
620 span = eval_const_binop(nir_op_isub, bit_size, limit, initial, in get_iteration()
622 iter = eval_const_binop(nir_op_idiv, bit_size, span, step, in get_iteration()
628 span = eval_const_binop(nir_op_isub, bit_size, limit, initial, in get_iteration()
630 iter = eval_const_binop(nir_op_udiv, bit_size, span, step, in get_iteration()
[all …]
Dnir_format_convert.h72 nir_ssa_def *shift = nir_imm_int(b, src->bit_size - bits[i]); in nir_format_sign_extend_ivec()
85 const unsigned bit_size = packed->bit_size; in nir_format_unpack_int() local
88 if (bits[0] >= bit_size) { in nir_format_unpack_int()
89 assert(bits[0] == bit_size); in nir_format_unpack_int()
97 assert(bits[i] < bit_size); in nir_format_unpack_int()
98 assert(offset + bits[i] <= bit_size); in nir_format_unpack_int()
100 nir_ssa_def *lshift = nir_imm_int(b, bit_size - (offset + bits[i])); in nir_format_unpack_int()
101 nir_ssa_def *rshift = nir_imm_int(b, bit_size - bits[i]); in nir_format_unpack_int()
107 if (offset >= bit_size) { in nir_format_unpack_int()
109 offset -= bit_size; in nir_format_unpack_int()
[all …]
Dnir_lower_alu.c138 if (src0->bit_size < 32) { in lower_alu_instr()
141 …nir_op upcast_op = nir_type_conversion_op(base_type | src0->bit_size, base_type | 32, nir_rounding… in lower_alu_instr()
142 …nir_op downscast_op = nir_type_conversion_op(base_type | 32, base_type | src0->bit_size, nir_round… in lower_alu_instr()
147 nir_ssa_def *dest_shifted = nir_ishr(b, dest_32, nir_imm_int(b, src0->bit_size)); in lower_alu_instr()
150 nir_ssa_def *c1 = nir_imm_intN_t(b, 1, src0->bit_size); in lower_alu_instr()
151 nir_ssa_def *cshift = nir_imm_int(b, src0->bit_size / 2); in lower_alu_instr()
152 … nir_ssa_def *cmask = nir_imm_intN_t(b, (1ull << (src0->bit_size / 2)) - 1, src0->bit_size); in lower_alu_instr()
155 nir_ssa_def *c0 = nir_imm_intN_t(b, 0, src0->bit_size); in lower_alu_instr()
205 nir_imm_intN_t(b, 1, src0->bit_size))), in lower_alu_instr()
/external/python/rsa/tests/
Dtest_common.py19 from rsa.common import byte_size, bit_size, inverse
60 self.assertEqual(bit_size(0), 0)
63 self.assertEqual(bit_size(1023), 10)
64 self.assertEqual(bit_size(1024), 11)
65 self.assertEqual(bit_size(1025), 11)
66 self.assertEqual(bit_size(1 << 1024), 1025)
67 self.assertEqual(bit_size((1 << 1024) + 1), 1025)
68 self.assertEqual(bit_size((1 << 1024) - 1), 1024)
71 self.assertEqual(bit_size(-1023), 10)
72 self.assertEqual(bit_size(-1024), 11)
[all …]
/external/mesa3d/src/intel/compiler/
Dbrw_nir_lower_mem_access_bit_sizes.c32 unsigned num_components, unsigned bit_size, in dup_mem_intrinsic() argument
68 num_components, bit_size, in dup_mem_intrinsic()
87 const unsigned bit_size = intrin->dest.ssa.bit_size; in lower_mem_load_bit_size() local
89 const unsigned bytes_read = num_components * (bit_size / 8); in lower_mem_load_bit_size()
92 if (bit_size == 32 && align >= 32 && intrin->num_components <= 4 && in lower_mem_load_bit_size()
98 if (bit_size < 32 && !needs_scalar && nir_src_is_const(*offset_src)) { in lower_mem_load_bit_size()
103 assert(load_offset % (bit_size / 8) == 0); in lower_mem_load_bit_size()
113 num_components, bit_size); in lower_mem_load_bit_size()
143 num_components, bit_size); in lower_mem_load_bit_size()
164 const unsigned bit_size = value->bit_size; in lower_mem_store_bit_size() local
[all …]
/external/cronet/net/third_party/quiche/src/quiche/spdy/core/hpack/
Dhpack_output_stream.cc17 void HpackOutputStream::AppendBits(uint8_t bits, size_t bit_size) { in AppendBits() argument
18 QUICHE_DCHECK_GT(bit_size, 0u); in AppendBits()
19 QUICHE_DCHECK_LE(bit_size, 8u); in AppendBits()
20 QUICHE_DCHECK_EQ(bits >> bit_size, 0); in AppendBits()
21 size_t new_bit_offset = bit_offset_ + bit_size; in AppendBits()
24 QUICHE_DCHECK_LE(bit_size, 8u); in AppendBits()
25 buffer_.append(1, bits << (8 - bit_size)); in AppendBits()
40 AppendBits(prefix.bits, prefix.bit_size); in AppendPrefix()
/external/mesa3d/src/compiler/nir/tests/
Dload_store_vectorizer_tests.cpp52 … uint32_t id, unsigned bit_size=32, unsigned components=1,
55 uint32_t id, unsigned bit_size=32, unsigned components=1,
59 uint32_t id, unsigned bit_size=32, unsigned components=1,
62 uint32_t id, unsigned bit_size=32, unsigned components=1, unsigned wrmask=0xf,
66 unsigned bit_size=32, unsigned components=1);
68 unsigned bit_size=32, unsigned components=1, unsigned wrmask=0xf);
74 unsigned bit_size,
199 unsigned bit_size, unsigned components, unsigned access) in create_indirect_load() argument
219 nir_ssa_dest_init(&load->instr, &load->dest, components, bit_size, NULL); in create_indirect_load()
227 int byte_size = (bit_size == 1 ? 32 : bit_size) / 8; in create_indirect_load()
[all …]
/external/mesa3d/src/gallium/drivers/zink/nir_to_spirv/
Dnir_to_spirv.c78 get_fvec_constant(struct ntv_context *ctx, unsigned bit_size,
82 get_uvec_constant(struct ntv_context *ctx, unsigned bit_size,
86 get_ivec_constant(struct ntv_context *ctx, unsigned bit_size,
120 emit_float_const(struct ntv_context *ctx, int bit_size, float value) in emit_float_const() argument
122 assert(bit_size == 32); in emit_float_const()
123 return spirv_builder_const_float(&ctx->builder, bit_size, value); in emit_float_const()
127 emit_uint_const(struct ntv_context *ctx, int bit_size, uint32_t value) in emit_uint_const() argument
129 assert(bit_size == 32); in emit_uint_const()
130 return spirv_builder_const_uint(&ctx->builder, bit_size, value); in emit_uint_const()
134 emit_int_const(struct ntv_context *ctx, int bit_size, int32_t value) in emit_int_const() argument
[all …]
/external/mesa3d/src/gallium/drivers/r600/sb/
Dsb_valtable.cpp390 assert(id < bit_size); in get()
397 assert(id < bit_size); in set()
410 assert(id < bit_size); in set_chk()
433 if (cur_data_size && size > bit_size && bit_size % bt_bits) { in resize()
434 basetype clear_mask = (~(basetype)0u) << (bit_size % bt_bits); in resize()
438 bit_size = size; in resize()
442 assert(start < bit_size); in find_bit()
458 return bit_size; in find_bit()
531 std::swap(bit_size, bs2.bit_size); in swap()
535 if (bit_size != bs2.bit_size) in operator ==()
[all …]
/external/mesa3d/prebuilt-intermediates/nir/
Dnir_constant_expressions.c41 constant_denorm_flush_to_zero(nir_const_value *value, unsigned bit_size) in constant_denorm_flush_to_zero() argument
43 switch(bit_size) { in constant_denorm_flush_to_zero()
564 unsigned bit_size, in evaluate_amul() argument
568 switch (bit_size) { in evaluate_amul()
673 unsigned bit_size, in evaluate_b16all_fequal16() argument
677 switch (bit_size) { in evaluate_b16all_fequal16()
842 unsigned bit_size, in evaluate_b16all_fequal2() argument
846 switch (bit_size) { in evaluate_b16all_fequal2()
1011 unsigned bit_size, in evaluate_b16all_fequal3() argument
1015 switch (bit_size) { in evaluate_b16all_fequal3()
[all …]
/external/mesa3d/src/gallium/auxiliary/gallivm/
Dlp_bld_nir.h64 unsigned bit_size,
70 unsigned bit_size,
76 unsigned nc, unsigned bit_size,
82 unsigned nc, unsigned bit_size,
95 unsigned nc, unsigned bit_size,
98 unsigned writemask, unsigned nc, unsigned bit_size,
119 unsigned bit_size,
129 unsigned bit_size,
151 unsigned nc, unsigned bit_size,
156 unsigned bit_size, LLVMValueRef offset,
/external/virglrenderer/src/mesa/util/
Dmacros.h405 u_intN_max(unsigned bit_size) in u_intN_max() argument
407 assert(bit_size <= 64 && bit_size > 0); in u_intN_max()
408 return INT64_MAX >> (64 - bit_size); in u_intN_max()
412 u_intN_min(unsigned bit_size) in u_intN_min() argument
418 return (-u_intN_max(bit_size)) - 1; in u_intN_min()
422 u_uintN_max(unsigned bit_size) in u_uintN_max() argument
424 assert(bit_size <= 64 && bit_size > 0); in u_uintN_max()
425 return UINT64_MAX >> (64 - bit_size); in u_uintN_max()

123456789