Home
last modified time | relevance | path

Searched refs:BitWidth (Results 1 – 25 of 140) sorted by relevance

123456

/third_party/flatbuffers/ts/flexbuffers/
Dbit-width-util.ts1 import { BitWidth } from './bit-width'
3 export function toByteWidth(bitWidth: BitWidth): number {
7 export function iwidth(value: number | bigint): BitWidth {
8 if (value >= -128 && value <= 127) return BitWidth.WIDTH8;
9 if (value >= -32768 && value <= 32767) return BitWidth.WIDTH16;
10 if (value >= -2147483648 && value <= 2147483647) return BitWidth.WIDTH32;
11 return BitWidth.WIDTH64;
14 export function fwidth(value: number): BitWidth {
15 return value === Math.fround(value) ? BitWidth.WIDTH32 : BitWidth.WIDTH64;
18 export function uwidth(value: number): BitWidth {
[all …]
Dstack-value.ts2 import { BitWidth } from './bit-width'
12 elementWidth(size: number, index: number): BitWidth {
29 if (this.width === BitWidth.WIDTH32) {
50 storedWidth(width = BitWidth.WIDTH8): BitWidth {
54 storedPackedType(width = BitWidth.WIDTH8): ValueType {
Dbuilder.ts1 import { BitWidth } from './bit-width'
34 private align(width: BitWidth) {
56 pushInt(value: number, width: BitWidth): void {
57 if (width === BitWidth.WIDTH8) {
59 } else if (width === BitWidth.WIDTH16) {
61 } else if (width === BitWidth.WIDTH32) {
63 } else if (width === BitWidth.WIDTH64) {
70 pushUInt(value: number, width: BitWidth): void {
71 if (width === BitWidth.WIDTH8) {
73 } else if (width === BitWidth.WIDTH16) {
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DKnownBits.h36 KnownBits(unsigned BitWidth) : Zero(BitWidth, 0), One(BitWidth, 0) {} in KnownBits()
127 KnownBits trunc(unsigned BitWidth) const { in trunc()
128 return KnownBits(Zero.trunc(BitWidth), One.trunc(BitWidth)); in trunc()
135 KnownBits zext(unsigned BitWidth, bool ExtendedBitsAreKnownZero) const { in zext()
137 APInt NewZero = Zero.zext(BitWidth); in zext()
140 return KnownBits(NewZero, One.zext(BitWidth)); in zext()
145 KnownBits sext(unsigned BitWidth) const { in sext()
146 return KnownBits(Zero.sext(BitWidth), One.sext(BitWidth)); in sext()
153 KnownBits zextOrTrunc(unsigned BitWidth, in zextOrTrunc()
155 if (BitWidth > getBitWidth()) in zextOrTrunc()
[all …]
/third_party/flatbuffers/dart/lib/src/
Dtypes.dart4 enum BitWidth {
12 static int toByteWidth(BitWidth self) {
15 static BitWidth width(num value) {
18 if (v >> 7 == 0) return BitWidth.width8;
19 if (v >> 15 == 0) return BitWidth.width16;
20 if (v >> 31 == 0) return BitWidth.width32;
21 return BitWidth.width64;
23 return value == _toF32(value) ? BitWidth.width32 : BitWidth.width64;
25 static BitWidth uwidth(num value) {
28 if (v >> 8 == 0) return BitWidth.width8;
[all …]
Dbuilder.dart141 final stackValue = _StackValue.WithOffset(keyOffset, ValueType.Key, BitWidth.width8);
434 int _align(BitWidth width) {
477 void _pushInt(int value, BitWidth width) {
480 case BitWidth.width8:
483 case BitWidth.width16:
486 case BitWidth.width32:
489 case BitWidth.width64:
495 void _pushUInt(int value, BitWidth width) {
498 case BitWidth.width8:
501 case BitWidth.width16:
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/ADT/
DAPInt.h97 unsigned BitWidth; ///< The number of bits in this APInt. variable
107 APInt(uint64_t *val, unsigned bits) : BitWidth(bits) { in APInt()
114 bool isSingleWord() const { return BitWidth <= APINT_BITS_PER_WORD; } in isSingleWord()
149 unsigned WordBits = ((BitWidth-1) % APINT_BITS_PER_WORD) + 1; in clearUnusedBits()
278 : BitWidth(numBits) { in BitWidth() function
279 assert(BitWidth && "bitwidth too small"); in BitWidth()
321 APInt(const APInt &that) : BitWidth(that.BitWidth) { in APInt()
329 APInt(APInt &&that) : BitWidth(that.BitWidth) { in APInt()
331 that.BitWidth = 0; in APInt()
345 explicit APInt() : BitWidth(1) { U.VAL = 0; } in APInt()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DDemandedBits.cpp90 unsigned BitWidth = AB.getBitWidth(); in determineLiveOperandBits() local
99 [&](unsigned BitWidth, const Value *V1, const Value *V2) { in determineLiveOperandBits() argument
105 Known = KnownBits(BitWidth); in determineLiveOperandBits()
109 Known2 = KnownBits(BitWidth); in determineLiveOperandBits()
136 ComputeKnownBits(BitWidth, Val, nullptr); in determineLiveOperandBits()
137 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits()
138 std::min(BitWidth, Known.countMaxLeadingZeros()+1)); in determineLiveOperandBits()
146 ComputeKnownBits(BitWidth, Val, nullptr); in determineLiveOperandBits()
147 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits()
148 std::min(BitWidth, Known.countMaxTrailingZeros()+1)); in determineLiveOperandBits()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/lib/Support/
DAPInt.cpp91 assert(BitWidth && "Bitwidth too small"); in initFromArray()
108 : BitWidth(numBits), VAL(0) { in APInt()
113 : BitWidth(numBits), VAL(0) { in APInt()
118 : BitWidth(numbits), VAL(0) { in APInt()
119 assert(BitWidth && "Bitwidth too small"); in APInt()
128 if (BitWidth == RHS.getBitWidth()) { in AssignSlowCase()
151 BitWidth = RHS.BitWidth; in AssignSlowCase()
239 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator +=()
274 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator -=()
359 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator *=()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DAPInt.cpp92 assert(BitWidth && "Bitwidth too small"); in initFromArray()
109 : BitWidth(numBits) { in APInt()
114 : BitWidth(numBits) { in APInt()
119 : BitWidth(numbits) { in APInt()
120 assert(BitWidth && "Bitwidth too small"); in APInt()
127 BitWidth = NewBitWidth; in reallocate()
136 BitWidth = NewBitWidth; in reallocate()
160 ID.AddInteger(BitWidth); in Profile()
194 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator +=()
214 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator -=()
[all …]
/third_party/flatbuffers/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/
DFlexBuffersInternals.kt20 public inline class BitWidth(public val value: Int) { class
21 public inline fun max(other: BitWidth): BitWidth = if (this.value >= other.value) this else other in max()
71 internal fun IntArray.widthInUBits(): BitWidth = arrayWidthInUBits(this.size) { this[it].toULong().… in indirect()
72 internal fun ShortArray.widthInUBits(): BitWidth = arrayWidthInUBits(this.size) { this[it].toULong(… in <lambda>()
73 internal fun LongArray.widthInUBits(): BitWidth = arrayWidthInUBits(this.size) { this[it].toULong()… in <lambda>()
75 … inline fun arrayWidthInUBits(size: Int, crossinline elemWidthBlock: (Int) -> BitWidth): BitWidth { in arrayWidthInUBits()
86 internal fun ULong.widthInUBits(): BitWidth = when { in widthInUBits()
122 var minBitWidth: BitWidth = W_8, in isTypedVector()
127 …inline fun storedPackedType(parentBitWidth: BitWidth = W_8): Byte = packedType(storedWidth(parentB… in isTypedVector()
129 …private inline fun packedType(bitWidth: BitWidth, type: FlexBufferType): Byte = (bitWidth.value or… in isTypedVector()
[all …]
/third_party/flatbuffers/rust/flexbuffers/src/
Dbitwidth.rs15 use crate::bitwidth::BitWidth::*;
35 pub enum BitWidth { enum
41 impl BitWidth { impl
59 impl Default for BitWidth { implementation
68 impl From<$from> for BitWidth {
69 fn from(x: $from) -> BitWidth {
90 impl From<f64> for BitWidth { implementation
91 fn from(x: f64) -> BitWidth { in from() argument
99 impl From<f32> for BitWidth { implementation
100 fn from(_: f32) -> BitWidth { in from() argument
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/ADT/
DAPInt.h78 unsigned BitWidth; ///< The number of bits in this APInt. variable
102 APInt(uint64_t *val, unsigned bits) : BitWidth(bits), pVal(val) {} in APInt()
107 bool isSingleWord() const { return BitWidth <= APINT_BITS_PER_WORD; } in isSingleWord()
142 unsigned wordBits = BitWidth % APINT_BITS_PER_WORD; in clearUnusedBits()
241 : BitWidth(numBits), VAL(0) { in BitWidth() function
242 assert(BitWidth && "bitwidth too small"); in BitWidth()
283 APInt(const APInt &that) : BitWidth(that.BitWidth), VAL(0) { in APInt()
291 APInt(APInt &&that) : BitWidth(that.BitWidth), VAL(that.VAL) { in APInt()
292 that.BitWidth = 0; in APInt()
306 explicit APInt() : BitWidth(1), VAL(0) {} in APInt()
[all …]
/third_party/flatbuffers/rust/flexbuffers/src/reader/
Dmod.rs15 use crate::bitwidth::BitWidth;
49 expected: BitWidth,
50 actual: BitWidth,
106 const WIDTH: BitWidth;
112 const WIDTH: BitWidth = BitWidth::$WIDTH;
148 width: BitWidth,
168 width: BitWidth::default(), in default()
200 fn deref_offset(buffer: &[u8], address: usize, width: BitWidth) -> Result<usize, Error> { in deref_offset()
210 width: BitWidth, in new() argument
211 parent_width: BitWidth, in new() argument
[all …]
Dmap.rs16 use crate::BitWidth;
30 pub(super) values_width: BitWidth,
31 pub(super) keys_width: BitWidth,
50 values_width: BitWidth::default(), in default()
51 keys_width: BitWidth::default(), in default()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/ExecutionEngine/Orc/
DOrcMCJITReplacement.cpp90 unsigned BitWidth = cast<IntegerType>(RetTy)->getBitWidth(); in runFunction() local
91 if (BitWidth == 1) in runFunction()
92 rv.IntVal = APInt(BitWidth, ((bool (*)())(intptr_t)FPtr)()); in runFunction()
93 else if (BitWidth <= 8) in runFunction()
94 rv.IntVal = APInt(BitWidth, ((char (*)())(intptr_t)FPtr)()); in runFunction()
95 else if (BitWidth <= 16) in runFunction()
96 rv.IntVal = APInt(BitWidth, ((short (*)())(intptr_t)FPtr)()); in runFunction()
97 else if (BitWidth <= 32) in runFunction()
98 rv.IntVal = APInt(BitWidth, ((int (*)())(intptr_t)FPtr)()); in runFunction()
99 else if (BitWidth <= 64) in runFunction()
[all …]
/third_party/flatbuffers/dart/test/
Dflex_types_test.dart105 expect(ValueTypeUtils.packedType(ValueType.Null, BitWidth.width8), equals(0));
106 expect(ValueTypeUtils.packedType(ValueType.Null, BitWidth.width16), equals(1));
107 expect(ValueTypeUtils.packedType(ValueType.Null, BitWidth.width32), equals(2));
108 expect(ValueTypeUtils.packedType(ValueType.Null, BitWidth.width64), equals(3));
110 expect(ValueTypeUtils.packedType(ValueType.Int, BitWidth.width8), equals(4));
111 expect(ValueTypeUtils.packedType(ValueType.Int, BitWidth.width16), equals(5));
112 expect(ValueTypeUtils.packedType(ValueType.Int, BitWidth.width32), equals(6));
113 expect(ValueTypeUtils.packedType(ValueType.Int, BitWidth.width64), equals(7));
116 expect(BitWidthUtil.width(0), BitWidth.width8);
117 expect(BitWidthUtil.width(-20), BitWidth.width8);
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/IR/
DConstantRange.h62 explicit ConstantRange(uint32_t BitWidth, bool isFullSet);
73 static ConstantRange getEmpty(uint32_t BitWidth) { in getEmpty() argument
74 return ConstantRange(BitWidth, false); in getEmpty()
78 static ConstantRange getFull(uint32_t BitWidth) { in getFull() argument
79 return ConstantRange(BitWidth, true); in getFull()
295 uint32_t BitWidth) const;
301 ConstantRange zeroExtend(uint32_t BitWidth) const;
307 ConstantRange signExtend(uint32_t BitWidth) const;
313 ConstantRange truncate(uint32_t BitWidth) const;
317 ConstantRange zextOrTrunc(uint32_t BitWidth) const;
[all …]
/third_party/flatbuffers/python/flatbuffers/
Dflexbuffers.py33 class BitWidth(enum.IntEnum): class
50 return BitWidth.W8
52 return BitWidth.W16
54 return BitWidth.W32
56 return BitWidth.W64
73 return BitWidth.U(value if value >= 0 else ~value)
79 return BitWidth.W32
80 return BitWidth.W64
85 1: BitWidth.W8,
86 2: BitWidth.W16,
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/
DValueTypes.h58 static EVT getFloatingPointVT(unsigned BitWidth) { in getFloatingPointVT()
59 return MVT::getFloatingPointVT(BitWidth); in getFloatingPointVT()
64 static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth) { in getIntegerVT()
65 MVT M = MVT::getIntegerVT(BitWidth); in getIntegerVT()
68 return getExtendedIntegerVT(Context, BitWidth); in getIntegerVT()
103 unsigned BitWidth = EltTy.getSizeInBits(); in changeVectorElementTypeToInteger() local
104 MVT IntTy = MVT::getIntegerVT(BitWidth); in changeVectorElementTypeToInteger()
334 unsigned BitWidth = getSizeInBits(); in getRoundIntegerType() local
335 if (BitWidth <= 8) in getRoundIntegerType()
337 return getIntegerVT(Context, 1 << Log2_32_Ceil(BitWidth)); in getRoundIntegerType()
[all …]
/third_party/flatbuffers/rust/flexbuffers/src/builder/
Dvalue.rs17 use crate::bitwidth::BitWidth;
18 use crate::bitwidth::BitWidth::*;
37 child_width: BitWidth,
163 pub fn set_child_width_or_panic(&mut self, new_width: BitWidth) { in set_child_width_or_panic() argument
187 pub fn width_or_child_width(&self) -> BitWidth { in width_or_child_width() argument
208 pub fn width_in_vector(self, vector_start: usize, idx: usize) -> BitWidth { in width_in_vector() argument
217 for &width in BitWidth::iter() { in width_in_vector()
223 if BitWidth::from(offset) == width { in width_in_vector()
232 pub fn packed_type(self, parent_width: BitWidth) -> u8 { in packed_type()
275 pub fn store_value(buffer: &mut Vec<u8>, mut value: Value, width: BitWidth) { in store_value() argument
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/
DInstCombineSimplifyDemanded.cpp67 unsigned BitWidth = Inst.getType()->getScalarSizeInBits(); in SimplifyDemandedInstructionBits() local
68 KnownBits Known(BitWidth); in SimplifyDemandedInstructionBits()
69 APInt DemandedMask(APInt::getAllOnesValue(BitWidth)); in SimplifyDemandedInstructionBits()
123 uint32_t BitWidth = DemandedMask.getBitWidth(); in SimplifyDemandedUseBits() local
126 (!VTy->isIntOrIntVectorTy() || VTy->getScalarSizeInBits() == BitWidth) && in SimplifyDemandedUseBits()
127 Known.getBitWidth() == BitWidth && in SimplifyDemandedUseBits()
154 KnownBits LHSKnown(BitWidth), RHSKnown(BitWidth); in SimplifyDemandedUseBits()
399 Known = InputKnown.zextOrTrunc(BitWidth, in SimplifyDemandedUseBits()
451 Known = InputKnown.sext(BitWidth); in SimplifyDemandedUseBits()
462 APInt DemandedFromOps(APInt::getLowBitsSet(BitWidth, BitWidth-NLZ)); in SimplifyDemandedUseBits()
[all …]
DInstCombineShifts.cpp498 uint32_t BitWidth = Ty->getScalarSizeInBits(); in canEvaluateShifted()
500 APInt::getHighBitsSet(OrigBitWidth, OrigBitWidth-BitWidth)) && in canEvaluateShifted()
501 CI->getLimitedValue(BitWidth) < BitWidth) { in canEvaluateShifted()
943 unsigned BitWidth = Ty->getScalarSizeInBits(); in visitShl() local
961 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmt)); in visitShl()
991 if (AmtSum < BitWidth) in visitShl()
998 MaskedValueIsZero(Op0, APInt::getHighBitsSet(BitWidth, ShAmt), 0, &I)) { in visitShl()
1040 match(Op1, m_Sub(m_SpecificInt(BitWidth - 1), m_Value(X)))) in visitShl()
1042 ConstantInt::get(Ty, APInt::getSignMask(BitWidth)), X); in visitShl()
1063 unsigned BitWidth = Ty->getScalarSizeInBits(); in visitLShr() local
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/GlobalISel/
DGISelKnownBits.cpp80 unsigned BitWidth = Ty.getScalarSizeInBits(); in signBitIsZero() local
81 return maskedValueIsZero(R, APInt::getSignMask(BitWidth)); in signBitIsZero()
106 unsigned BitWidth = DstTy.getSizeInBits(); in computeKnownBitsImpl() local
107 Known = KnownBits(BitWidth); // Don't know anything in computeKnownBitsImpl()
249 BitWidth) - in computeKnownBitsImpl()
250 BitWidth; in computeKnownBitsImpl()
253 Known.Zero.setLowBits(std::min(TrailZ, BitWidth)); in computeKnownBitsImpl()
254 Known.Zero.setHighBits(std::min(LeadZ, BitWidth)); in computeKnownBitsImpl()
275 BitWidth > 1) in computeKnownBitsImpl()
284 Known = Known.sext(BitWidth); in computeKnownBitsImpl()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/SelectionDAG/
DFunctionLoweringInfo.cpp400 FunctionLoweringInfo::GetLiveOutRegInfo(unsigned Reg, unsigned BitWidth) { in GetLiveOutRegInfo() argument
408 if (BitWidth > LOI->Known.getBitWidth()) { in GetLiveOutRegInfo()
410 LOI->Known = LOI->Known.zext(BitWidth, false /* => any extend */); in GetLiveOutRegInfo()
432 unsigned BitWidth = IntVT.getSizeInBits(); in ComputePHILiveOutRegInfo() local
443 DestLOI.Known = KnownBits(BitWidth); in ComputePHILiveOutRegInfo()
448 APInt Val = CI->getValue().zextOrTrunc(BitWidth); in ComputePHILiveOutRegInfo()
460 const LiveOutInfo *SrcLOI = GetLiveOutRegInfo(SrcReg, BitWidth); in ComputePHILiveOutRegInfo()
468 assert(DestLOI.Known.Zero.getBitWidth() == BitWidth && in ComputePHILiveOutRegInfo()
469 DestLOI.Known.One.getBitWidth() == BitWidth && in ComputePHILiveOutRegInfo()
476 DestLOI.Known = KnownBits(BitWidth); in ComputePHILiveOutRegInfo()
[all …]

123456