You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
privatefunc _copyBytesHelper(to pointer:UnsafeMutablePointer<UInt8>, from range:CountableRange<Index>){
@@ -154,7 +154,7 @@ public struct DispatchData : RandomAccessCollection {
154
154
155
155
/// Copy the contents of the data into a buffer.
156
156
///
157
-
/// This function copies the bytes in `range` from the data into the buffer. If the count of the `range` is greater than `MemoryLayout<DestinationType>.size * buffer.count` then the first N bytes will be copied into the buffer.
157
+
/// This function copies the bytes in `range` from the data into the buffer. If the count of the `range` is greater than `MemoryLayout<DestinationType>.stride * buffer.count` then the first N bytes will be copied into the buffer.
158
158
/// - precondition: The range must be within the bounds of the data. Otherwise `fatalError` is called.
159
159
/// - parameter buffer: A buffer to copy the data into.
160
160
/// - parameter range: A range in the data to copy into the buffer. If the range is empty, this function will return 0 without copying anything. If the range is nil, as much data as will fit into `buffer` is copied.
@@ -172,17 +172,17 @@ public struct DispatchData : RandomAccessCollection {
172
172
precondition(r.endIndex >=0)
173
173
precondition(r.endIndex <= cnt,"The range is outside the bounds of the data")
0 commit comments