Home
last modified time | relevance | path

Searched refs:byteWidth (Results 1 – 17 of 17) sorted by relevance

/external/flatbuffers/java/com/google/flatbuffers/
DFlexBuffers.java154 private static int indirect(ReadBuf bb, int offset, int byteWidth) { in indirect() argument
156 return (int) (offset - readUInt(bb, offset, byteWidth)); in indirect()
160 private static long readUInt(ReadBuf buff, int end, int byteWidth) { in readUInt() argument
161 switch (byteWidth) { in readUInt()
171 private static int readInt(ReadBuf buff, int end, int byteWidth) { in readInt() argument
172 return (int) readLong(buff, end, byteWidth); in readInt()
176 private static long readLong(ReadBuf buff, int end, int byteWidth) { in readLong() argument
177 switch (byteWidth) { in readLong()
186 private static double readDouble(ReadBuf buff, int end, int byteWidth) { in readDouble() argument
187 switch (byteWidth) { in readDouble()
[all …]
DFlexBuffersBuilder.java391 int byteWidth = align(bitWidth); in writeBlob() local
392 writeInt(blob.length, byteWidth); in writeBlob()
403 int byteWidth = 1 << alignment; in align() local
404 int padBytes = Value.paddingBytes(bb.writePosition(), byteWidth); in align()
408 return byteWidth; in align()
411 private void writeInt(long value, int byteWidth) { in writeInt() argument
412 switch (byteWidth) { in writeInt()
483 int byteWidth = align(stack.get(0).elemWidth(bb.writePosition(), 0)); in finish() local
484 writeAny(stack.get(0), byteWidth); in finish()
488 bb.put((byte) byteWidth); in finish()
[all …]
/external/flatbuffers/ts/flexbuffers/
Dreference.ts16 const byteWidth = dataView.getUint8(len - 1); constant
18 const parentWidth = fromByteWidth(byteWidth);
19 const offset = len - byteWidth - 2; constant
24 …, key: string, dataView: DataView, offset: number, parentWidth: number, byteWidth: number, length:…
26 const elementOffset = _indirect + index * byteWidth;
27 const packedType = dataView.getUint8(_indirect + length * byteWidth + index);
28 …return new Reference(dataView, elementOffset, fromByteWidth(byteWidth), packedType, `${path}/${key…
32 private readonly byteWidth: number property in Reference
36 this.byteWidth = 1 << (packedType & 3)
65 …s.dataView, indirect(this.dataView, this.offset, this.parentWidth), fromByteWidth(this.byteWidth));
[all …]
Dbuilder.ts35 const byteWidth = toByteWidth(width); constant
36 this.offset += paddingSize(this.offset, byteWidth);
37 return byteWidth;
84 private writeInt(value: number, byteWidth: number) {
85 const newOffset = this.computeOffset(byteWidth);
86 this.pushInt(value, fromByteWidth(byteWidth));
90 private writeUInt(value: number, byteWidth: number) {
91 const newOffset = this.computeOffset(byteWidth);
92 this.pushUInt(value, fromByteWidth(byteWidth));
99 const byteWidth = this.align(bitWidth); constant
[all …]
Dreference-util.ts64 …x(key: string, dataView: DataView, offset: number, parentWidth: number, byteWidth: number, length:…
66 const keysVectorOffset = indirect(dataView, offset, parentWidth) - byteWidth * 3;
67 const bitWidth = fromByteWidth(byteWidth);
69 const _byteWidth = Number(readUInt(dataView, keysVectorOffset + byteWidth, bitWidth));
97 …index: number, dataView: DataView, offset: number, parentWidth: number, byteWidth: number): string…
98 const keysVectorOffset = indirect(dataView, offset, parentWidth) - byteWidth * 3;
99 const bitWidth = fromByteWidth(byteWidth);
101 const _byteWidth = Number(readUInt(dataView, keysVectorOffset + byteWidth, bitWidth));
Dstack-value.ts26 writeToBuffer(byteWidth: number): void {
27 const newOffset = this.builder.computeOffset(byteWidth);
35 const bitWidth = fromByteWidth(byteWidth);
38 const bitWidth = fromByteWidth(byteWidth);
/external/flatbuffers/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/
DFlexBuffersBuilder.kt58 val byteWidth = align(stack[0].elemWidth(buffer.writePosition, 0)) in finish() constant
59 writeAny(stack[0], byteWidth) in finish()
63 buffer.put(byteWidth.value.toByte()) in finish()
458 val byteWidth = align(bitWidth) in setTypedVector() constant
461 writeInt(length, byteWidth) in setTypedVector()
465 writeBlock(byteWidth) in setTypedVector()
506 private fun writeAny(toWrite: Value, byteWidth: ByteWidth) = when (toWrite.type) { in writeAny()
507 T_NULL, T_BOOL, T_INT, T_UINT -> writeInt(toWrite.iValue, byteWidth) in writeAny()
508 T_FLOAT -> writeDouble(toWrite.dValue, byteWidth) in writeAny()
509 else -> writeOffset(toWrite.iValue.toInt(), byteWidth) in writeAny()
[all …]
DFlexBuffersInternals.kt45 internal inline fun ReadBuffer.readULong(end: Int, byteWidth: ByteWidth): ULong { in readULong()
46 return when (byteWidth.value) { in readULong()
51 else -> error("invalid byte width $byteWidth for scalar unsigned integer") in readULong()
55 internal inline fun ReadBuffer.readFloat(end: Int, byteWidth: ByteWidth): Double { in readFloat()
56 return when (byteWidth.value) { in readFloat()
59 …else -> error("invalid byte width $byteWidth for floating point scalar") // we should never reach … in readFloat()
64 … inline fun ReadBuffer.indirect(offset: Int, byteWidth: ByteWidth): Int = offset - readInt(offset,… in indirect()
66 …ernal inline fun ReadBuffer.readSize(end: Int, byteWidth: ByteWidth) = readInt(end - byteWidth, by… in indirect()
67 …nternal inline fun ReadBuffer.readUInt(end: Int, byteWidth: ByteWidth): UInt = readULong(end, byte… in indirect()
68 internal inline fun ReadBuffer.readInt(end: Int, byteWidth: ByteWidth): Int = readULong(end, byteWi… in indirect()
[all …]
DFlexBuffers.kt30 val byteWidth = buffer[--end].toInt() in <lambda>() constant
32 end -= byteWidth // The root data item. in <lambda>()
33 return Reference(buffer, end, ByteWidth(byteWidth), packetType) in <lambda>()
45 internal val byteWidth: ByteWidth, constant in com.google.flatbuffers.kotlin.Reference
291 val size = buffer.readULong(start - byteWidth, byteWidth).toInt() in toString()
309 …ec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth) in toByteArray()
324 …ec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth) in toShortArray()
339 …ec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth) in toIntArray()
354 …ec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth) in toLongArray()
369 …ec = TypedVector(type.toElementTypedVector(), buffer, buffer.indirect(end, parentWidth), byteWidth) in toUByteArray()
[all …]
DJSON.kt41 val size = buffer.readULong(start - byteWidth, byteWidth).toInt() in toJson()
/external/flatbuffers/dart/lib/src/
Dbuilder.dart104 final byteWidth = _align(bitWidth);
105 _writeUInt(length, byteWidth);
144 final byteWidth = _align(bitWidth);
145 _writeUInt(length, byteWidth);
168 final byteWidth = _align(stackValue.width);
169 final newOffset = _newOffset(byteWidth);
193 final byteWidth = _align(stackValue.width);
194 final newOffset = _newOffset(byteWidth);
294 final byteWidth = _align(value.elementWidth(_offset, 0));
295 _writeStackValue(value, byteWidth);
[all …]
Dreference.dart20 [int? byteWidth, ValueType? valueType])
21 : _byteWidth = byteWidth ?? 1 << (packedType & 3),
31 final byteWidth = byteData.getUint8(len - 1);
33 final offset = len - byteWidth - 2;
35 BitWidthUtil.fromByteWidth(byteWidth), packedType, "/");
145 int? byteWidth;
148 byteWidth = 1;
151 byteWidth = 1;
162 byteWidth,
359 final byteWidth = _readUInt(
[all …]
/external/angle/src/libANGLE/renderer/d3d/d3d11/
Drenderer11_utils.h323 void InitConstantBufferDesc(D3D11_BUFFER_DESC *constantBufferDescription, size_t byteWidth);
Drenderer11_utils.cpp2608 void InitConstantBufferDesc(D3D11_BUFFER_DESC *constantBufferDescription, size_t byteWidth) in InitConstantBufferDesc() argument
2610 constantBufferDescription->ByteWidth = static_cast<UINT>(byteWidth); in InitConstantBufferDesc()
DStateManager11.cpp3756 context, static_cast<unsigned int>(uniformBufferOffset), cache.byteWidth, in syncUniformBuffersForShader()
/external/angle/src/libANGLE/renderer/d3d/
DProgramD3D.h124 unsigned int byteWidth; member
DProgramD3D.cpp2415 cacheUseSB.byteWidth = uniformBlock.mByteWidths[shaderType]; in updateUniformBufferCache()