Home
last modified time | relevance | path

Searched refs:kAlignment (Results 1 – 25 of 52) sorted by relevance

123

/external/perfetto/src/profiling/memory/
Dshared_ring_buffer.cc45 constexpr auto kAlignment = 8; // 64 bits to use aligned memcpy(). variable
46 constexpr auto kHeaderSize = kAlignment;
199 base::AlignUp<kAlignment>(size + kHeaderSize); in BeginWrite()
237 PERFETTO_DCHECK(reinterpret_cast<uintptr_t>(wr_ptr) % kAlignment == 0); in EndWrite()
266 PERFETTO_DCHECK(reinterpret_cast<uintptr_t>(rd_ptr) % kAlignment == 0); in BeginRead()
274 const size_t size_with_header = base::AlignUp<kAlignment>(size + kHeaderSize); in BeginRead()
287 PERFETTO_DCHECK(reinterpret_cast<uintptr_t>(rd_ptr) % kAlignment == 0); in BeginRead()
294 size_t size_with_header = base::AlignUp<kAlignment>(buf.size + kHeaderSize); in EndRead()
301 pos.write_pos % kAlignment || pos.read_pos % kAlignment) { in IsCorrupt()
/external/llvm-project/llvm/tools/llvm-exegesis/lib/
DBenchmarkRunner.h49 static constexpr const size_t kAlignment = 1024; member
52 : UnalignedPtr(std::make_unique<char[]>(kSize + kAlignment)), in ScratchSpace()
54 UnalignedPtr.get() + kAlignment - in ScratchSpace()
55 (reinterpret_cast<intptr_t>(UnalignedPtr.get()) % kAlignment)) {} in ScratchSpace()
/external/skqp/src/gpu/
DGrMemoryPool.cpp34 minAllocSize = SkTMax<size_t>(GrSizeAlignUp(minAllocSize, kAlignment), kSmallestMinAllocSize); in GrMemoryPool()
35 preallocSize = SkTMax<size_t>(GrSizeAlignUp(preallocSize, kAlignment), minAllocSize); in GrMemoryPool()
71 size = GrSizeAlignUp(size, kAlignment); in allocate()
156 SkASSERT(!(reinterpret_cast<intptr_t>(block) % kAlignment)); in CreateBlock()
191 SkASSERT(!(b % kAlignment)); in validate()
192 SkASSERT(!(totalSize % kAlignment)); in validate()
193 SkASSERT(!(block->fCurrPtr % kAlignment)); in validate()
DGrMemoryPool.h121 kAlignment = 8, enumerator
122 kHeaderSize = GR_CT_ALIGN_UP(sizeof(BlockHeader), kAlignment),
123 kPerAllocPad = GR_CT_ALIGN_UP(sizeof(AllocHeader), kAlignment),
/external/pigweed/pw_kvs/
Dalignment_test.cc122 constexpr size_t kAlignment = 10; variable
133 EXPECT_EQ(data.size() % kAlignment, 0u); in __anon413676270202()
141 AlignedWriterBuffer<32> writer(kAlignment, check_against_data); in TEST()
305 AlignedWriterBuffer<32> writer(kAlignment, check_against_data); in TEST()
318 AlignedWriterBuffer<kAlignment> writer(kAlignment, check_against_data); in TEST()
321 input.BreakOnIndex(kAlignment + 2); in TEST()
325 EXPECT_LE(result.size(), kAlignment); // Wrote the first chunk, nothing more. in TEST()
Dchecksum_test.cc90 constexpr size_t kAlignment = 10; variable
97 class PickyChecksum final : public AlignedChecksum<kAlignment, 32> {
106 ASSERT_EQ(data.size() % kAlignment, 0u); in UpdateAligned()
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/random/internal/
Dpool_urbg.cc191 constexpr size_t kAlignment = in PoolAlignedAlloc() local
197 void* memory = std::malloc(sizeof(RandenPoolEntry) + kAlignment); in PoolAlignedAlloc()
199 auto y = x % kAlignment; in PoolAlignedAlloc()
201 (y == 0) ? memory : reinterpret_cast<void*>(x + kAlignment - y); in PoolAlignedAlloc()
/external/angle/third_party/abseil-cpp/absl/random/internal/
Dpool_urbg.cc191 constexpr size_t kAlignment = in PoolAlignedAlloc() local
198 new char[sizeof(RandenPoolEntry) + kAlignment]); in PoolAlignedAlloc()
199 auto y = x % kAlignment; in PoolAlignedAlloc()
200 void* aligned = reinterpret_cast<void*>(y == 0 ? x : (x + kAlignment - y)); in PoolAlignedAlloc()
/external/libtextclassifier/abseil-cpp/absl/random/internal/
Dpool_urbg.cc191 constexpr size_t kAlignment = in PoolAlignedAlloc() local
197 void* memory = std::malloc(sizeof(RandenPoolEntry) + kAlignment); in PoolAlignedAlloc()
199 auto y = x % kAlignment; in PoolAlignedAlloc()
201 (y == 0) ? memory : reinterpret_cast<void*>(x + kAlignment - y); in PoolAlignedAlloc()
/external/abseil-cpp/absl/random/internal/
Dpool_urbg.cc191 constexpr size_t kAlignment = in PoolAlignedAlloc() local
197 void* memory = std::malloc(sizeof(RandenPoolEntry) + kAlignment); in PoolAlignedAlloc()
199 auto y = x % kAlignment; in PoolAlignedAlloc()
201 (y == 0) ? memory : reinterpret_cast<void*>(x + kAlignment - y); in PoolAlignedAlloc()
/external/webrtc/third_party/abseil-cpp/absl/random/internal/
Dpool_urbg.cc191 constexpr size_t kAlignment = in PoolAlignedAlloc() local
197 void* memory = std::malloc(sizeof(RandenPoolEntry) + kAlignment); in PoolAlignedAlloc()
199 auto y = x % kAlignment; in PoolAlignedAlloc()
201 (y == 0) ? memory : reinterpret_cast<void*>(x + kAlignment - y); in PoolAlignedAlloc()
/external/openscreen/third_party/abseil/src/absl/random/internal/
Dpool_urbg.cc191 constexpr size_t kAlignment = in PoolAlignedAlloc() local
197 void* memory = std::malloc(sizeof(RandenPoolEntry) + kAlignment); in PoolAlignedAlloc()
199 auto y = x % kAlignment; in PoolAlignedAlloc()
201 (y == 0) ? memory : reinterpret_cast<void*>(x + kAlignment - y); in PoolAlignedAlloc()
/external/skia/bench/
DGrMemoryPoolBench.cpp18 struct alignas(GrMemoryPool::kAlignment) Aligned {
22 static_assert(sizeof(Aligned) % GrMemoryPool::kAlignment == 0);
30 static_assert(sizeof(Unaligned) % GrMemoryPool::kAlignment != 0);
33 static_assert(GrAlignTo(sizeof(Unaligned), GrMemoryPool::kAlignment) == sizeof(Aligned));
/external/gemmlowp/internal/
Dallocator.h89 static constexpr std::size_t kAlignment = kDefaultCacheLineSize;
101 storage_ = aligned_alloc(kAlignment, storage_size_);
138 const std::size_t bytes = RoundUp<kAlignment>(n * sizeof(T));
/external/skia/src/gpu/
DGrMemoryPool.h31 static constexpr size_t kAlignment = 8;
34 static constexpr size_t kAlignment = alignof(std::max_align_t);
DGrMemoryPool.cpp63 static_assert(alignof(Header) <= kAlignment); in allocate()
66 GrBlockAllocator::ByteRange alloc = fAllocator.allocate<kAlignment, sizeof(Header)>(size); in allocate()
112 GrBlockAllocator::Block* block = fAllocator.owningBlock<kAlignment>(header, header->fStart); in release()
/external/gemmlowp/test/
Dtest_allocator.cc32 !(reinterpret_cast<std::uintptr_t>(int32_array) % Allocator::kAlignment)); in test_allocator()
34 !(reinterpret_cast<std::uintptr_t>(int8_array) % Allocator::kAlignment)); in test_allocator()
/external/webrtc/third_party/abseil-cpp/absl/synchronization/internal/
Dcreate_thread_identity.cc114 sizeof(*identity) + base_internal::PerThreadSynch::kAlignment - 1); in NewThreadIdentity()
118 base_internal::PerThreadSynch::kAlignment)); in NewThreadIdentity()
/external/angle/third_party/abseil-cpp/absl/synchronization/internal/
Dcreate_thread_identity.cc114 sizeof(*identity) + base_internal::PerThreadSynch::kAlignment - 1); in NewThreadIdentity()
118 base_internal::PerThreadSynch::kAlignment)); in NewThreadIdentity()
/external/openscreen/third_party/abseil/src/absl/synchronization/internal/
Dcreate_thread_identity.cc114 sizeof(*identity) + base_internal::PerThreadSynch::kAlignment - 1); in NewThreadIdentity()
118 base_internal::PerThreadSynch::kAlignment)); in NewThreadIdentity()
/external/abseil-cpp/absl/synchronization/internal/
Dcreate_thread_identity.cc114 sizeof(*identity) + base_internal::PerThreadSynch::kAlignment - 1); in NewThreadIdentity()
118 base_internal::PerThreadSynch::kAlignment)); in NewThreadIdentity()
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/synchronization/internal/
Dcreate_thread_identity.cc114 sizeof(*identity) + base_internal::PerThreadSynch::kAlignment - 1); in NewThreadIdentity()
118 base_internal::PerThreadSynch::kAlignment)); in NewThreadIdentity()
/external/libtextclassifier/abseil-cpp/absl/synchronization/internal/
Dcreate_thread_identity.cc114 sizeof(*identity) + base_internal::PerThreadSynch::kAlignment - 1); in NewThreadIdentity()
118 base_internal::PerThreadSynch::kAlignment)); in NewThreadIdentity()
/external/tensorflow/tensorflow/core/kernels/
Dmeta_support.cc42 const int kAlignment = 32; variable
43 const int kScratchSize = 2048 * 1024 + kAlignment;
51 scratch_.get() + kAlignment - in Scratch()
52 (reinterpret_cast<uintptr_t>(scratch_.get()) % kAlignment); in Scratch()
/external/boringssl/src/tool/
Dspeed.cc361 static const unsigned kAlignment = 16; in SpeedAEADChunk() local
373 std::unique_ptr<uint8_t[]> in_storage(new uint8_t[chunk_len + kAlignment]); in SpeedAEADChunk()
378 new uint8_t[chunk_len + overhead_len + kAlignment]); in SpeedAEADChunk()
380 new uint8_t[chunk_len + overhead_len + kAlignment]); in SpeedAEADChunk()
384 new uint8_t[overhead_len + kAlignment]); in SpeedAEADChunk()
387 uint8_t *const in = align(in_storage.get(), kAlignment); in SpeedAEADChunk()
389 uint8_t *const out = align(out_storage.get(), kAlignment); in SpeedAEADChunk()
391 uint8_t *const tag = align(tag_storage.get(), kAlignment); in SpeedAEADChunk()
393 uint8_t *const in2 = align(in2_storage.get(), kAlignment); in SpeedAEADChunk()

123