Home
last modified time | relevance | path

Searched refs:num_bits (Results 1 – 25 of 216) sorted by relevance

123456789

/external/mesa3d/src/util/tests/fast_idiv_by_const/
Dfast_idiv_by_const_test.cpp37 utrunc(uint64_t x, unsigned num_bits) in utrunc() argument
39 if (num_bits == 64) in utrunc()
42 return (x << (64 - num_bits)) >> (64 - num_bits); in utrunc()
46 strunc(int64_t x, unsigned num_bits) in strunc() argument
48 if (num_bits == 64) in strunc()
51 return (int64_t)((uint64_t)x << (64 - num_bits)) >> (64 - num_bits); in strunc()
55 uint_is_in_range(uint64_t x, unsigned num_bits) in uint_is_in_range() argument
57 if (num_bits == 64) in uint_is_in_range()
60 return x < (1ull << num_bits); in uint_is_in_range()
64 sint_is_in_range(int64_t x, unsigned num_bits) in sint_is_in_range() argument
[all …]
/external/mesa3d/src/gallium/auxiliary/vl/
Dvl_vlc.h227 vl_vlc_peekbits(struct vl_vlc *vlc, unsigned num_bits) in vl_vlc_peekbits() argument
229 assert(vl_vlc_valid_bits(vlc) >= num_bits || vlc->data >= vlc->end); in vl_vlc_peekbits()
230 return vlc->buffer >> (64 - num_bits); in vl_vlc_peekbits()
237 vl_vlc_eatbits(struct vl_vlc *vlc, unsigned num_bits) in vl_vlc_eatbits() argument
239 assert(vl_vlc_valid_bits(vlc) >= num_bits); in vl_vlc_eatbits()
241 vlc->buffer <<= num_bits; in vl_vlc_eatbits()
242 vlc->invalid_bits += num_bits; in vl_vlc_eatbits()
249 vl_vlc_get_uimsbf(struct vl_vlc *vlc, unsigned num_bits) in vl_vlc_get_uimsbf() argument
253 assert(vl_vlc_valid_bits(vlc) >= num_bits); in vl_vlc_get_uimsbf()
255 value = vlc->buffer >> (64 - num_bits); in vl_vlc_get_uimsbf()
[all …]
/external/deqp-deps/amber/src/
Dtype.h56 static bool IsInt8(FormatMode mode, uint32_t num_bits) { in IsInt8() argument
57 return IsSignedInt(mode) && num_bits == 8; in IsInt8()
59 static bool IsInt16(FormatMode mode, uint32_t num_bits) { in IsInt16() argument
60 return IsSignedInt(mode) && num_bits == 16; in IsInt16()
62 static bool IsInt32(FormatMode mode, uint32_t num_bits) { in IsInt32() argument
63 return IsSignedInt(mode) && num_bits == 32; in IsInt32()
65 static bool IsInt64(FormatMode mode, uint32_t num_bits) { in IsInt64() argument
66 return IsSignedInt(mode) && num_bits == 64; in IsInt64()
69 static bool IsUint8(FormatMode mode, uint32_t num_bits) { in IsUint8() argument
70 return IsUnsignedInt(mode) && num_bits == 8; in IsUint8()
[all …]
Dbuffer.cc42 uint32_t num_bits = seg->GetNumBits(); in CalculateDiff() local
43 if (type::Type::IsInt8(mode, num_bits)) in CalculateDiff()
45 if (type::Type::IsInt16(mode, num_bits)) in CalculateDiff()
47 if (type::Type::IsInt32(mode, num_bits)) in CalculateDiff()
49 if (type::Type::IsInt64(mode, num_bits)) in CalculateDiff()
51 if (type::Type::IsUint8(mode, num_bits)) in CalculateDiff()
53 if (type::Type::IsUint16(mode, num_bits)) in CalculateDiff()
55 if (type::Type::IsUint32(mode, num_bits)) in CalculateDiff()
57 if (type::Type::IsUint64(mode, num_bits)) in CalculateDiff()
59 if (type::Type::IsFloat16(mode, num_bits)) { in CalculateDiff()
[all …]
Dverifier.cc226 uint32_t num_bits = seg.GetNumBits(); in GetActualValuesFromTexel() local
227 CopyBitsOfMemoryToBuffer(actual, texel, bit_offset, num_bits); in GetActualValuesFromTexel()
230 if (type::Type::IsInt8(mode, num_bits)) { in GetActualValuesFromTexel()
234 } else if (type::Type::IsInt16(mode, num_bits)) { in GetActualValuesFromTexel()
238 } else if (type::Type::IsInt32(mode, num_bits)) { in GetActualValuesFromTexel()
242 } else if (type::Type::IsInt64(mode, num_bits)) { in GetActualValuesFromTexel()
246 } else if (type::Type::IsUint8(mode, num_bits)) { in GetActualValuesFromTexel()
248 } else if (type::Type::IsUint16(mode, num_bits)) { in GetActualValuesFromTexel()
252 } else if (type::Type::IsUint32(mode, num_bits)) { in GetActualValuesFromTexel()
256 } else if (type::Type::IsUint64(mode, num_bits)) { in GetActualValuesFromTexel()
[all …]
/external/libgav1/libgav1/src/utils/
Draw_bit_reader.cc64 int64_t RawBitReader::ReadLiteral(int num_bits) { in ReadLiteral() argument
65 assert(num_bits <= 32); in ReadLiteral()
66 if (!CanReadLiteral(num_bits)) return -1; in ReadLiteral()
67 assert(num_bits > 0); in ReadLiteral()
69 int bit = num_bits - 1; in ReadLiteral()
85 bool RawBitReader::ReadInverseSignedLiteral(int num_bits, int* const value) { in ReadInverseSignedLiteral() argument
86 assert(num_bits + 1 < 32); in ReadInverseSignedLiteral()
87 *value = static_cast<int>(ReadLiteral(num_bits + 1)); in ReadInverseSignedLiteral()
89 const int sign_bit = 1 << num_bits; in ReadInverseSignedLiteral()
191 bool RawBitReader::VerifyAndSkipTrailingBits(size_t num_bits) { in VerifyAndSkipTrailingBits() argument
[all …]
Draw_bit_reader.h34 int64_t ReadLiteral(int num_bits) override; // f(n) in the spec.
35 bool ReadInverseSignedLiteral(int num_bits,
56 bool VerifyAndSkipTrailingBits(size_t num_bits);
64 bool SkipBits(size_t num_bits);
68 bool CanReadLiteral(size_t num_bits) const;
/external/freetype/src/lzw/
Dftzopen.c39 state->num_bits ); /* WHY? */ in ft_lzwstate_refill()
43 state->in_eof = FT_BOOL( count < state->num_bits ); in ft_lzwstate_refill()
47 if ( state->buf_size > state->num_bits ) in ft_lzwstate_refill()
48 state->buf_size -= state->num_bits - 1; in ft_lzwstate_refill()
62 FT_UInt num_bits = state->num_bits; in ft_lzwstate_get_code() local
74 state->num_bits = ++num_bits; in ft_lzwstate_get_code()
75 if ( num_bits > LZW_MAX_BITS ) in ft_lzwstate_get_code()
78 state->free_bits = state->num_bits < state->max_bits in ft_lzwstate_get_code()
79 ? (FT_UInt)( ( 1UL << num_bits ) - 256 ) in ft_lzwstate_get_code()
85 state->num_bits = num_bits = LZW_INIT_BITS; in ft_lzwstate_get_code()
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dfake_quant_ops.cc57 bool IsNumBitsValid(int num_bits) { return num_bits >= 2 && num_bits <= 16; } in IsNumBitsValid() argument
75 int num_bits; in FakeQuantWithMinMaxArgsOp() local
76 OP_REQUIRES_OK(context, context->GetAttr("num_bits", &num_bits)); in FakeQuantWithMinMaxArgsOp()
78 context, IsNumBitsValid(num_bits), in FakeQuantWithMinMaxArgsOp()
83 quant_max_ = (1 << num_bits) - 1; in FakeQuantWithMinMaxArgsOp()
116 int num_bits; in FakeQuantWithMinMaxArgsGradientOp() local
117 OP_REQUIRES_OK(context, context->GetAttr("num_bits", &num_bits)); in FakeQuantWithMinMaxArgsGradientOp()
119 context, IsNumBitsValid(num_bits), in FakeQuantWithMinMaxArgsGradientOp()
124 quant_max_ = (1 << num_bits) - 1; in FakeQuantWithMinMaxArgsGradientOp()
189 int num_bits; in FakeQuantWithMinMaxVarsOp() local
[all …]
/external/deqp-deps/amber/src/vkscript/
Ddatum_type_parser.cc53 uint8_t num_bits = 32; in Parse() local
61 num_bits = 64; in Parse()
65 num_bits = 8; in Parse()
67 num_bits = 16; in Parse()
69 num_bits = 64; in Parse()
79 num_bits = 64; in Parse()
92 type = type::Number::Float(num_bits); in Parse()
94 type = type::Number::Int(num_bits); in Parse()
96 type = type::Number::Uint(num_bits); in Parse()
/external/pigweed/pw_random/public/pw_random/
Dxor_shift.h56 void InjectEntropyBits(uint32_t data, uint_fast8_t num_bits) final { in InjectEntropyBits() argument
57 if (num_bits == 0) { in InjectEntropyBits()
59 } else if (num_bits > 32) { in InjectEntropyBits()
60 num_bits = 32; in InjectEntropyBits()
64 uint64_t untouched_state = state_ >> (kNumStateBits - num_bits); in InjectEntropyBits()
65 state_ = untouched_state | (state_ << num_bits); in InjectEntropyBits()
67 uint32_t mask = (1 << num_bits) - 1; in InjectEntropyBits()
/external/webp/src/utils/
Drandom_utils.h39 static WEBP_INLINE int VP8RandomBits2(VP8Random* const rg, int num_bits, in VP8RandomBits2() argument
42 assert(num_bits + VP8_RANDOM_DITHER_FIX <= 31); in VP8RandomBits2()
49 diff = (int)((uint32_t)diff << 1) >> (32 - num_bits); in VP8RandomBits2()
51 diff += 1 << (num_bits - 1); // shift back to 0.5-center in VP8RandomBits2()
55 static WEBP_INLINE int VP8RandomBits(VP8Random* const rg, int num_bits) { in VP8RandomBits() argument
56 return VP8RandomBits2(rg, num_bits, rg->amp_); in VP8RandomBits()
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.quantization.pbtxt9 …argspec: "args=[\'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'name\'], varargs=N…
13 …argspec: "args=[\'gradients\', \'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'nam…
17 …argspec: "args=[\'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'name\'], varargs=N…
21 …argspec: "args=[\'gradients\', \'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'nam…
25 …argspec: "args=[\'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'name\'], varargs=N…
29 …argspec: "args=[\'gradients\', \'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'nam…
37 …argspec: "args=[\'input\', \'input_min\', \'input_max\', \'signed_input\', \'num_bits\', \'range_g…
41 …argspec: "args=[\'input\', \'input_min\', \'input_max\', \'signed_input\', \'num_bits\', \'range_g…
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.quantization.pbtxt9 …argspec: "args=[\'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'name\'], varargs=N…
13 …argspec: "args=[\'gradients\', \'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'nam…
17 …argspec: "args=[\'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'name\'], varargs=N…
21 …argspec: "args=[\'gradients\', \'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'nam…
25 …argspec: "args=[\'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'name\'], varargs=N…
29 …argspec: "args=[\'gradients\', \'inputs\', \'min\', \'max\', \'num_bits\', \'narrow_range\', \'nam…
37 …argspec: "args=[\'input\', \'input_min\', \'input_max\', \'signed_input\', \'num_bits\', \'range_g…
41 …argspec: "args=[\'input\', \'input_min\', \'input_max\', \'signed_input\', \'num_bits\', \'range_g…
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/
Dquantize_and_dequantize_test.cc40 const int num_bits = 8; in TEST() local
42 const int quant_max = (1 << num_bits) - 1; in TEST()
71 const int num_bits = 8; in TEST() local
73 const int quant_max = (1 << num_bits) - 1; in TEST()
102 const int num_bits = 16; in TEST() local
104 const int quant_max = (1 << num_bits) - 1; in TEST()
133 const int num_bits = 16; in TEST() local
135 const int quant_max = (1 << num_bits) - 1; in TEST()
/external/tensorflow/tensorflow/lite/delegates/gpu/common/tasks/
Dquantize_and_dequantize_test_util.cc34 const int num_bits = 8; in QuantAndDequant_Dim2Bits8Test() local
36 const int quant_max = (1 << num_bits) - 1; in QuantAndDequant_Dim2Bits8Test()
71 const int num_bits = 8; in QuantAndDequant_Dim3Bits8_NegativeRangeTest() local
73 const int quant_max = (1 << num_bits) - 1; in QuantAndDequant_Dim3Bits8_NegativeRangeTest()
107 const int num_bits = 16; in QuantAndDequant_Dim3Bits16Test() local
109 const int quant_max = (1 << num_bits) - 1; in QuantAndDequant_Dim3Bits16Test()
144 const int num_bits = 16; in QuantAndDequant_Dim2Bits16_NegativeRangeTest() local
146 const int quant_max = (1 << num_bits) - 1; in QuantAndDequant_Dim2Bits16_NegativeRangeTest()
/external/tensorflow/tensorflow/python/training/
Dquantize_training_wrapper.cc25 int num_bits) { in DoQuantizeTrainingOnGraphDefHelper() argument
30 input_graph, num_bits, "QuantizeAndDequantizeV2", &result)); in DoQuantizeTrainingOnGraphDefHelper()
43 [](const py::object input_graph, int num_bits) { in PYBIND11_MODULE() argument
46 input_graph.cast<std::string>(), num_bits)); in PYBIND11_MODULE()
/external/tensorflow/tensorflow/core/common_runtime/
Dquantize_training_test.cc106 const int num_bits = 8; in TEST_F() local
107 TF_ASSERT_OK(DoQuantizeTraining(num_bits, "QuantizeAndDequantizeV2", g)); in TEST_F()
157 const int num_bits = 8; in TEST_F() local
158 TF_ASSERT_OK(DoQuantizeTraining(num_bits, "QuantizeAndDequantizeV2", g)); in TEST_F()
210 int num_bits = 8; in TEST_F() local
211 TF_ASSERT_OK(DoQuantizeTraining(num_bits, "QuantizeAndDequantizeV2", g)); in TEST_F()
264 int num_bits = 8; in TEST_F() local
265 TF_ASSERT_OK(DoQuantizeTraining(num_bits, "FakeQuantWithMinMaxVars", g)); in TEST_F()
299 int num_bits = 8; in TEST_F() local
309 input_string, num_bits, "QuantizeAndDequantizeV2", &result_string)); in TEST_F()
[all …]
Dquantize_training.h38 Status DoQuantizeTraining(int32 num_bits, const string& quant_op_type,
44 int32 num_bits,
51 int32 num_bits, const string& quant_op_type,
/external/llvm-project/mlir/test/Dialect/Quant/
Dparse-ops.mlir7 min = 0.0 : f32, max = 1.0 : f32, num_bits = 8, narrow_range = true
10 min = 0.0 : f32, max = 1.0 : f32, num_bits = 8, narrow_range = false
13 min = 0.0 : f32, max = 1.0 : f32, num_bits = 8
22 …min = [0.0 : f32, 1.0 : f32], max = [2.0 : f32, 3.0 : f32], axis = 2, num_bits = 8, narrow_range =…
25 …min = [0.0 : f32, 1.0 : f32], max = [2.0 : f32, 3.0 : f32], axis = 2, num_bits = 8, narrow_range =…
28 min = [0.0 : f32, 1.0 : f32], max = [2.0 : f32, 3.0 : f32], axis = 2, num_bits = 8
Dconvert-fakequant.mlir13 min = 0.0 : f32, max = 0.0 : f32, num_bits = 8
28 min = 0.0 : f32, max = 0.0 : f32, num_bits = 8, narrow_range = true
43 min = 0.0 : f32, max = 1.0 : f32, num_bits = 8
58 min = 0.0 : f32, max = 1.0 : f32, num_bits = 8, narrow_range = true
73 min = -1.0 : f32, max = 0.9921875 : f32, num_bits = 8, narrow_range = false
88 min = 0.0 : f32, max = 0.0 : f32, num_bits = 8, is_signed = true
103 min = 0.0 : f32, max = 0.0 : f32, num_bits = 8, narrow_range = true, is_signed = true
118 min = 0.0 : f32, max = 1.0 : f32, num_bits = 8, is_signed = true
133 min = 0.0 : f32, max = 1.0 : f32, num_bits = 8, narrow_range = true, is_signed = true
148 min = -1.0 : f32, max = 0.9921875 : f32, num_bits = 8, narrow_range = false, is_signed = true
[all …]
/external/zstd/doc/educational_decoder/
Dzstd_decompress.c99 static inline u64 IO_read_bits(istream_t *const in, const int num_bits);
101 static inline void IO_rewind_bits(istream_t *const in, const int num_bits);
137 static inline u64 read_bits_LE(const u8 *src, const int num_bits,
163 u8 *num_bits; member
211 u8 *num_bits; member
1511 dst->num_bits = malloc(size); in HUF_copy_dtable()
1512 if (!dst->symbols || !dst->num_bits) { in HUF_copy_dtable()
1517 memcpy(dst->num_bits, src->num_bits, size); in HUF_copy_dtable()
1530 dst->num_bits = malloc(size); in FSE_copy_dtable()
1532 if (!dst->symbols || !dst->num_bits || !dst->new_state_base) { in FSE_copy_dtable()
[all …]
/external/tensorflow/tensorflow/lite/kernels/
Dlsh_projection.cc148 int num_bits = SizeOfDimension(hash, 1); in SparseLshProjection() local
151 for (int j = 0; j < num_bits; j++) { in SparseLshProjection()
152 float seed = GetTensorData<float>(hash)[i * num_bits + j]; in SparseLshProjection()
156 *out_buf++ = hash_signature + i * (1 << num_bits); in SparseLshProjection()
163 int num_bits = SizeOfDimension(hash, 1); in DenseLshProjection() local
165 for (int j = 0; j < num_bits; j++) { in DenseLshProjection()
166 float seed = GetTensorData<float>(hash)[i * num_bits + j]; in DenseLshProjection()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dfake_quantize_ops.cc90 xla::XlaOp input_max, int num_bits, bool narrow_range) { in BuildFakeQuantCustomCall() argument
92 XlaHelpers::IntegerLiteral(b, DataType::DT_INT32, num_bits); in BuildFakeQuantCustomCall()
179 int num_bits; in FakeQuantWithMinMaxArgsGradOp() local
180 OP_REQUIRES_OK(ctx, ctx->GetAttr("num_bits", &num_bits)); in FakeQuantWithMinMaxArgsGradOp()
181 OP_REQUIRES(ctx, num_bits >= 2 && num_bits <= 16, in FakeQuantWithMinMaxArgsGradOp()
184 num_bits)); in FakeQuantWithMinMaxArgsGradOp()
188 const float quant_max = (1 << num_bits) - 1; in FakeQuantWithMinMaxArgsGradOp()
277 int num_bits; in FakeQuantWithMinMaxVarsGradOp() local
278 OP_REQUIRES_OK(ctx, ctx->GetAttr("num_bits", &num_bits)); in FakeQuantWithMinMaxVarsGradOp()
279 OP_REQUIRES(ctx, num_bits >= 2 && num_bits <= 16, in FakeQuantWithMinMaxVarsGradOp()
[all …]
/external/tensorflow/tensorflow/compiler/tests/
Dfake_quant_ops_test.py82 def _TestOp(self, input_min, input_max, num_bits, narrow_range, argument
118 num_bits=num_bits,
180 def _TestOp(self, input_min, input_max, num_bits, narrow_range, argument
212 num_bits=num_bits,
281 def _TestOp(self, input_min, input_max, num_bits, narrow_range, argument
319 num_bits=num_bits,
386 def _TestOp(self, input_min, input_max, num_bits, narrow_range, argument
422 num_bits=num_bits,

123456789