Home
last modified time | relevance | path

Searched refs:numBytes (Results 1 – 25 of 157) sorted by relevance

1234567

/third_party/vk-gl-cts/framework/delibs/debase/
DdeMemory.c64 void* deMalloc (size_t numBytes) in deMalloc() argument
68 DE_ASSERT(numBytes > 0); in deMalloc()
70 ptr = malloc((size_t)numBytes); in deMalloc()
76 memset(ptr, 0xcd, numBytes); in deMalloc()
81 VALGRIND_MAKE_MEM_UNDEFINED(ptr, numBytes); in deMalloc()
94 void* deCalloc (size_t numBytes) in deCalloc() argument
96 void* ptr = deMalloc(numBytes); in deCalloc()
98 deMemset(ptr, 0, numBytes); in deCalloc()
108 void* deRealloc (void* ptr, size_t numBytes) in deRealloc() argument
110 return realloc(ptr, numBytes); in deRealloc()
[all …]
DdeMemory.h35 void* deMalloc (size_t numBytes);
36 void* deCalloc (size_t numBytes);
37 void* deRealloc (void* ptr, size_t numBytes);
40 void* deAlignedMalloc (size_t numBytes, size_t alignBytes);
41 void* deAlignedRealloc(void* ptr, size_t numBytes, size_t alignBytes);
52 DE_INLINE void deMemset (void* ptr, int value, size_t numBytes) in deMemset() argument
55 memset(ptr, value, numBytes); in deMemset()
58 DE_INLINE int deMemCmp (const void* a, const void* b, size_t numBytes) in deMemCmp() argument
60 return memcmp(a, b, numBytes); in deMemCmp()
70 DE_INLINE void* deMemcpy (void* dst, const void* src, size_t numBytes) in deMemcpy() argument
[all …]
/third_party/skia/third_party/externals/oboe/samples/parselib/src/main/cpp/stream/
DMemInputStream.cpp23 int32_t MemInputStream::read(void *buff, int32_t numBytes) { in read() argument
25 numBytes = std::min(numBytes, numAvail); in read()
27 peek(buff, numBytes); in read()
28 mPos += numBytes; in read()
29 return numBytes; in read()
32 int32_t MemInputStream::peek(void *buff, int32_t numBytes) { in peek() argument
34 numBytes = std::min(numBytes, numAvail); in peek()
35 memcpy(buff, mBuffer + mPos, numBytes); in peek()
36 return numBytes; in peek()
39 void MemInputStream::advance(int32_t numBytes) { in advance() argument
[all …]
DFileInputStream.cpp22 int32_t FileInputStream::read(void *buff, int32_t numBytes) { in read() argument
23 return ::read(mFH, buff, numBytes); in read()
26 int32_t FileInputStream::peek(void *buff, int32_t numBytes) { in peek() argument
27 int32_t numRead = ::read(mFH, buff, numBytes); in peek()
28 ::lseek(mFH, -numBytes, SEEK_CUR); in peek()
32 void FileInputStream::advance(int32_t numBytes) { in advance() argument
33 if (numBytes > 0) { in advance()
34 ::lseek(mFH, numBytes, SEEK_CUR); in advance()
/third_party/skia/third_party/externals/oboe/src/fifo/
DFifoBuffer.cpp84 int32_t numBytes = convertFramesToBytes(frames1); in read() local
85 if (numBytes < 0) { in read()
88 memcpy(destination, source, static_cast<size_t>(numBytes)); in read()
89 destination += numBytes; in read()
93 numBytes = convertFramesToBytes(frames2); in read()
94 if (numBytes < 0) { in read()
97 memcpy(destination, source, static_cast<size_t>(numBytes)); in read()
100 int32_t numBytes = convertFramesToBytes(framesToRead); in read() local
101 if (numBytes < 0) { in read()
104 memcpy(destination, source, static_cast<size_t>(numBytes)); in read()
[all …]
/third_party/vk-gl-cts/modules/glshared/
DglsBufferTestUtil.hpp54 void fillWithRandomBytes (deUint8* ptr, int numBytes, deUint32 seed);
55 …compareByteArrays (tcu::TestLog& log, const deUint8* resPtr, const deUint8* refPtr, int numBytes);
90 void setSize (int numBytes);
91 void setData (int numBytes, const deUint8* bytes);
92 void setSubData (int offset, int numBytes, const deUint8* bytes);
123 …virtual void write (deUint32 buffer, int offset, int numBytes, const deUint8* bytes) = DE_NU…
124 …virtual void write (deUint32 buffer, int offset, int numBytes, const deUint8* bytes, deUint3…
142 void write (deUint32 buffer, int offset, int numBytes, const deUint8* bytes);
143 …void write (deUint32 buffer, int offset, int numBytes, const deUint8* bytes, deUint32 targ…
160 virtual void write (deUint32 buffer, int offset, int numBytes, const deUint8* bytes);
[all …]
DglsBufferTestUtil.cpp68 void fillWithRandomBytes (deUint8* ptr, int numBytes, deUint32 seed) in fillWithRandomBytes() argument
70 …std::copy(tcu::RandomValueIterator<deUint8>::begin(seed, numBytes), tcu::RandomValueIterator<deUin… in fillWithRandomBytes()
73 …l compareByteArrays (tcu::TestLog& log, const deUint8* resPtr, const deUint8* refPtr, int numBytes) in compareByteArrays() argument
84 for (;ndx < numBytes; ndx++) in compareByteArrays()
233 void ReferenceBuffer::setSize (int numBytes) in setSize() argument
235 m_data.resize(numBytes); in setSize()
238 void ReferenceBuffer::setData (int numBytes, const deUint8* bytes) in setData() argument
240 m_data.resize(numBytes); in setData()
241 std::copy(bytes, bytes+numBytes, m_data.begin()); in setData()
244 void ReferenceBuffer::setSubData (int offset, int numBytes, const deUint8* bytes) in setSubData() argument
[all …]
/third_party/vk-gl-cts/framework/delibs/decpp/
DdeMemPool.hpp51 void* alloc (deUintptr numBytes);
52 void* alignedAlloc (deUintptr numBytes, deUint32 alignBytes);
86 inline void* MemPool::alloc (deUintptr numBytes) in alloc() argument
89 DE_ASSERT((deUintptr)(int)numBytes == numBytes); in alloc()
90 void* ptr = deMemPool_alloc(m_pool, (int)numBytes); in alloc()
96 inline void* MemPool::alignedAlloc (deUintptr numBytes, deUint32 alignBytes) in alignedAlloc() argument
99 DE_ASSERT((deUintptr)(int)numBytes == numBytes); in alignedAlloc()
100 void* ptr = deMemPool_alignedAlloc(m_pool, (int)numBytes, alignBytes); in alignedAlloc()
DdeRingBuffer.cpp63 int numBytes = rnd.getInt(1, buffer.getNumElements()); in RingBuffer_selfTest() local
64 vector<int> tmp (numBytes); in RingBuffer_selfTest()
66 buffer.popBack(&tmp[0], numBytes); in RingBuffer_selfTest()
68 for (int i = 0; i < numBytes; i++) in RingBuffer_selfTest()
71 readPos += numBytes; in RingBuffer_selfTest()
77 int numBytes = rnd.getInt(1, de::min(dataSize-writePos, buffer.getNumFree())); in RingBuffer_selfTest() local
78 buffer.pushFront(&data[writePos], numBytes); in RingBuffer_selfTest()
79 writePos += numBytes; in RingBuffer_selfTest()
/third_party/flutter/skia/third_party/externals/angle2/src/common/
DPoolAlloc.h159 void *allocate(size_t numBytes);
164 ANGLE_INLINE uint8_t *fastAllocate(size_t numBytes) in fastAllocate() argument
167 return reinterpret_cast<uint8_t *>(allocate(numBytes)); in fastAllocate()
171 ASSERT(numBytes <= (mPageSize - mHeaderSkip)); in fastAllocate()
175 if (numBytes <= mPageSize - mCurrentPageOffset) in fastAllocate()
181 mCurrentPageOffset += numBytes; in fastAllocate()
184 return reinterpret_cast<uint8_t *>(allocateNewPage(numBytes, numBytes)); in fastAllocate()
241 void *allocateNewPage(size_t numBytes, size_t allocationSize);
243 void *initializeAllocation(Header *block, unsigned char *memory, size_t numBytes) in initializeAllocation() argument
246 new (memory) Allocation(numBytes + mAlignment, memory, block->lastAllocation); in initializeAllocation()
[all …]
DPoolAlloc.cpp209 void *PoolAllocator::allocate(size_t numBytes) in allocate() argument
218 mTotalBytes += numBytes; in allocate()
225 size_t allocationSize = Allocation::AllocationSize(numBytes) + mAlignment; in allocate()
227 if (allocationSize < numBytes) in allocate()
243 return initializeAllocation(mInUseList, memory, numBytes); in allocate()
270 return std::align(mAlignment, numBytes, unalignedPtr, allocationSize); in allocate()
273 static_cast<unsigned char *>(allocateNewPage(numBytes, allocationSize)); in allocate()
274 return initializeAllocation(mInUseList, newPageAddr, numBytes); in allocate()
276 void *alloc = malloc(numBytes + mAlignmentMask); in allocate()
286 void *PoolAllocator::allocateNewPage(size_t numBytes, size_t allocationSize) in allocateNewPage() argument
DPoolAlloc_unittest.cpp19 size_t numBytes = 1024; in TEST() local
23 void *allocation = poolAllocator.allocate(numBytes); in TEST()
31 allocation = poolAllocator.allocate(numBytes); in TEST()
42 numBytes = (rand() % (1024 * 4)) + 1; in TEST()
43 allocation = poolAllocator.allocate(numBytes); in TEST()
47 memset(allocation, 0xb8, numBytes); in TEST()
/third_party/skia/third_party/externals/angle2/src/common/
DPoolAlloc_unittest.cpp19 size_t numBytes = 1024; in TEST() local
23 void *allocation = poolAllocator.allocate(numBytes); in TEST()
31 allocation = poolAllocator.allocate(numBytes); in TEST()
42 numBytes = (rand() % (1024 * 4)) + 1; in TEST()
43 allocation = poolAllocator.allocate(numBytes); in TEST()
47 memset(allocation, 0xb8, numBytes); in TEST()
67 const size_t numBytes = rand() % (1024 * 4) + 1; in TEST_P() local
68 void *allocation = poolAllocator.allocate(numBytes); in TEST_P()
71 << "Iteration " << i << " allocating " << numBytes; in TEST_P()
DPoolAlloc.h97 void *allocate(size_t numBytes);
102 ANGLE_INLINE uint8_t *fastAllocate(size_t numBytes) in fastAllocate() argument
105 return reinterpret_cast<uint8_t *>(allocate(numBytes)); in fastAllocate()
109 ASSERT(numBytes <= (mPageSize - mPageHeaderSkip)); in fastAllocate()
113 if (numBytes <= mPageSize - mCurrentPageOffset) in fastAllocate()
119 mCurrentPageOffset += numBytes; in fastAllocate()
122 return allocateNewPage(numBytes); in fastAllocate()
147 uint8_t *allocateNewPage(size_t numBytes);
149 void *initializeAllocation(uint8_t *memory, size_t numBytes);
DPoolAlloc.cpp337 void *PoolAllocator::allocate(size_t numBytes) in allocate() argument
346 mTotalBytes += numBytes; in allocate()
352 Allocation::AllocationSize(currentPagePtr, numBytes, mAlignment, &preAllocationPadding); in allocate()
355 ASSERT(allocationSize >= numBytes); in allocate()
364 return initializeAllocation(memory, numBytes); in allocate()
375 numBytes, mAlignment, &preAllocationPadding); in allocate()
397 Allocation::AllocationSize(currentPagePtr, numBytes, mAlignment, &preAllocationPadding); in allocate()
399 return initializeAllocation(currentPagePtr + preAllocationPadding, numBytes); in allocate()
402 uint8_t *newPageAddr = allocateNewPage(numBytes); in allocate()
403 return initializeAllocation(newPageAddr, numBytes); in allocate()
[all …]
/third_party/gptfdisk/
Ddiskio-windows.cc224 int DiskIO::Read(void* buffer, int numBytes) { in Read() argument
237 if (numBytes <= blockSize) { in Read()
241 numBlocks = numBytes / blockSize; in Read()
242 if ((numBytes % blockSize) != 0) in Read()
253 for (i = 0; i < numBytes; i++) { in Read()
258 if (((numBlocks * blockSize) != numBytes) && (retval > 0)) in Read()
259 retval = numBytes; in Read()
268 int DiskIO::Write(void* buffer, int numBytes) { in Write() argument
281 if (numBytes <= blockSize) { in Write()
285 numBlocks = numBytes / blockSize; in Write()
[all …]
Ddiskio-unix.cc337 int DiskIO::Read(void* buffer, int numBytes) { in Read() argument
349 if (numBytes <= blockSize) { in Read()
353 numBlocks = numBytes / blockSize; in Read()
354 if ((numBytes % blockSize) != 0) in Read()
365 memcpy(buffer, tempSpace, numBytes); in Read()
368 if (((numBlocks * blockSize) != numBytes) && (retval > 0)) in Read()
369 retval = numBytes; in Read()
380 int DiskIO::Write(void* buffer, int numBytes) { in Write() argument
392 if (numBytes <= blockSize) { in Write()
396 numBlocks = numBytes / blockSize; in Write()
[all …]
/third_party/protobuf/java/core/src/test/java/com/google/protobuf/
DIsValidUtf8TestUtil.java237 static void testBytes(ByteStringFactory factory, int numBytes, long expectedCount) {
238 testBytes(factory, numBytes, expectedCount, 0, -1);
253 ByteStringFactory factory, int numBytes, long expectedCount, long start, long lim) {
255 byte[] bytes = new byte[numBytes];
258 lim = 1L << (numBytes * 8);
264 for (int i = 0; i < numBytes; i++) {
280 assertEquals(isRoundTrippable, Utf8.isValidUtf8(bytes, 0, numBytes));
283 assertEquals(s, Utf8.decodeUtf8(bytes, 0, numBytes));
293 int i = rnd.nextInt(numBytes);
294 int j = rnd.nextInt(numBytes);
[all …]
/third_party/vk-gl-cts/executor/
DxeBatchExecutor.cpp287 void BatchExecutor::onTestLogData (const deUint8* bytes, size_t numBytes) in onTestLogData() argument
291 m_testLogParser.parse(bytes, numBytes); in onTestLogData()
300 void BatchExecutor::onInfoLogData (const deUint8* bytes, size_t numBytes) in onInfoLogData() argument
302 if (numBytes > 0 && m_infoLog) in onInfoLogData()
303 m_infoLog->append(bytes, numBytes); in onInfoLogData()
362 void BatchExecutor::enqueueTestLogData (void* userPtr, const deUint8* bytes, size_t numBytes) in enqueueTestLogData() argument
368 << numBytes; in enqueueTestLogData()
370 writer.write(bytes, numBytes); in enqueueTestLogData()
374 void BatchExecutor::enqueueInfoLogData (void* userPtr, const deUint8* bytes, size_t numBytes) in enqueueInfoLogData() argument
380 << numBytes; in enqueueInfoLogData()
[all …]
DxeCallQueue.cpp178 void CallReader::read (deUint8* bytes, size_t numBytes) in read() argument
180 DE_ASSERT(m_curPos + numBytes <= m_call->getDataSize()); in read()
181 deMemcpy(bytes, m_call->getData()+m_curPos, numBytes); in read()
182 m_curPos += numBytes; in read()
185 const deUint8* CallReader::getDataBlock (size_t numBytes) in getDataBlock() argument
187 DE_ASSERT(m_curPos + numBytes <= m_call->getDataSize()); in getDataBlock()
190 m_curPos += numBytes; in getDataBlock()
232 void CallWriter::write (const deUint8* bytes, size_t numBytes) in write() argument
236 m_call->setDataSize(curPos+numBytes); in write()
237 deMemcpy(m_call->getData()+curPos, bytes, numBytes); in write()
/third_party/vk-gl-cts/modules/gles2/functional/
Des2fBufferTestUtil.hpp50 void fillWithRandomBytes (deUint8* ptr, int numBytes, deUint32 seed);
51 …compareByteArrays (tcu::TestLog& log, const deUint8* resPtr, const deUint8* refPtr, int numBytes);
83 void setSize (int numBytes);
84 void setData (int numBytes, const deUint8* bytes);
85 void setSubData (int offset, int numBytes, const deUint8* bytes);
112 …virtual bool verify (deUint32 buffer, const deUint8* reference, int offset, int numBytes) = …
132 bool verify (deUint32 buffer, const deUint8* reference, int offset, int numBytes);
149 bool verify (deUint32 buffer, const deUint8* reference, int offset, int numBytes);
165 bool verify (deUint32 buffer, const deUint8* reference, int offset, int numBytes);
Des2fBufferTestUtil.cpp70 void fillWithRandomBytes (deUint8* ptr, int numBytes, deUint32 seed) in fillWithRandomBytes() argument
72 …std::copy(tcu::RandomValueIterator<deUint8>::begin(seed, numBytes), tcu::RandomValueIterator<deUin… in fillWithRandomBytes()
75 …l compareByteArrays (tcu::TestLog& log, const deUint8* resPtr, const deUint8* refPtr, int numBytes) in compareByteArrays() argument
86 for (;ndx < numBytes; ndx++) in compareByteArrays()
221 void ReferenceBuffer::setSize (int numBytes) in setSize() argument
223 m_data.resize(numBytes); in setSize()
226 void ReferenceBuffer::setData (int numBytes, const deUint8* bytes) in setData() argument
228 m_data.resize(numBytes); in setData()
229 std::copy(bytes, bytes+numBytes, m_data.begin()); in setData()
232 void ReferenceBuffer::setSubData (int offset, int numBytes, const deUint8* bytes) in setSubData() argument
[all …]
/third_party/mesa3d/src/mesa/main/
Deval.c499 GLsizei numBytes; in _mesa_GetnMapdvARB() local
522 numBytes = n * sizeof *v; in _mesa_GetnMapdvARB()
523 if (bufSize < numBytes) in _mesa_GetnMapdvARB()
532 numBytes = 1 * sizeof *v; in _mesa_GetnMapdvARB()
533 if (bufSize < numBytes) in _mesa_GetnMapdvARB()
538 numBytes = 2 * sizeof *v; in _mesa_GetnMapdvARB()
539 if (bufSize < numBytes) in _mesa_GetnMapdvARB()
547 numBytes = 2 * sizeof *v; in _mesa_GetnMapdvARB()
548 if (bufSize < numBytes) in _mesa_GetnMapdvARB()
554 numBytes = 4 * sizeof *v; in _mesa_GetnMapdvARB()
[all …]
/third_party/vk-gl-cts/framework/delibs/dethread/win32/
DdeThreadWin32.c119 static SYSTEM_LOGICAL_PROCESSOR_INFORMATION* getWin32ProcessorInfo (deUint32* numBytes) in getWin32ProcessorInfo() argument
131 *numBytes = inOutLen; in getWin32ProcessorInfo()
158 …cessorInfo (ProcessorInfo* dst, const SYSTEM_LOGICAL_PROCESSOR_INFORMATION* src, deUint32 numBytes) in parseWin32ProcessorInfo() argument
164 …nst deUint8*)cur - (const deUint8*)src) + sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION) <= numBytes) in parseWin32ProcessorInfo()
182 deUint32 numBytes = 0; in getProcessorInfo() local
183 SYSTEM_LOGICAL_PROCESSOR_INFORMATION* rawInfo = getWin32ProcessorInfo(&numBytes); in getProcessorInfo()
185 if (!numBytes) in getProcessorInfo()
188 parseWin32ProcessorInfo(info, rawInfo, numBytes); in getProcessorInfo()
/third_party/flutter/engine/flutter/shell/platform/fuchsia/dart-pkg/zircon/lib/src/
Dsystem.dart66 final int numBytes;
69 const ReadResult(final int status, [this.bytes, this.numBytes, this.handles])
72 bytes.buffer.asUint8List(bytes.offsetInBytes, numBytes);
76 'ReadResult(status=$status, bytes=$bytes, numBytes=$numBytes, handles=$handles)';
81 final int numBytes;
83 const WriteResult(final int status, [this.numBytes]) : super(status);
85 String toString() => 'WriteResult(status=$status, numBytes=$numBytes)';
100 final int numBytes;
102 const FromFileResult(final int status, [this.handle, this.numBytes])
106 'FromFileResult(status=$status, handle=$handle, numBytes=$numBytes)';

1234567