Skip to content

Commit 49ae2dd

Browse files
glessardlorentey
andauthored
Update benchmark/single-source/BufferFill.swift
Co-authored-by: Karoy Lorentey <[email protected]>
1 parent e06d03e commit 49ae2dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

benchmark/single-source/BufferFill.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ var b8: UnsafeMutableBufferPointer<UInt8> = .init(start: nil, count: 0)
131131
public func rawBufferCopyContentsSetup() {
132132
assert(r8.baseAddress == nil)
133133
let count = a.count * MemoryLayout<Int>.stride
134-
let rb = UnsafeMutableRawBufferPointer.allocate(byteCount: count, alignment: 8)
134+
let rb = UnsafeMutableRawBufferPointer.allocate(
135+
byteCount: count,
136+
alignment: MemoryLayout<Int>.alignment)
135137
a.withUnsafeBytes {
136138
rb.copyMemory(from: $0)
137139
}

0 commit comments

Comments
 (0)