MCPcopy Create free account
hub / github.com/apple/coremltools / Copy

Method Copy

deps/protobuf/csharp/src/Google.Protobuf/ByteArray.cs:50–64  ·  view source on GitHub ↗

Determines which copy routine to use based on the number of bytes to be copied.

(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count)

Source from the content-addressed store, hash-verified

48 /// Determines which copy routine to use based on the number of bytes to be copied.
49 /// </summary>
50 internal static void Copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count)
51 {
52 if (count > CopyThreshold)
53 {
54 Buffer.BlockCopy(src, srcOffset, dst, dstOffset, count);
55 }
56 else
57 {
58 int stop = srcOffset + count;
59 for (int i = srcOffset; i < stop; i++)
60 {
61 dst[dstOffset++] = src[i];
62 }
63 }
64 }
65
66 /// <summary>
67 /// Reverses the order of bytes in the array

Callers 8

ReadMethod · 0.45
CopyFromMethod · 0.45
SetSizeMethod · 0.45
CopyToMethod · 0.45
RemoveMethod · 0.45
AddRangeMethod · 0.45
InsertMethod · 0.45
RemoveAtMethod · 0.45

Calls

no outgoing calls

Tested by 2

ReadMethod · 0.36
CopyFromMethod · 0.36