Click or drag to resize
Ab4d.SharpEngine logo

MemoryUtilsCopyToArray Method

Copies the size bytes from the source to the destinationArray. When source is aligned to 32, then non-temporal avx copy was performed. When destination array is not aligned to 32, then it can be resized and destinationArrayOffset is set to the offset when the data start.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public static bool CopyToArray(
	IntPtr source,
	ref byte[]?? destinationArray,
	int size,
	out int? destinationArrayOffset
)

Parameters

source  IntPtr
source as IntPtr (needs to be aligned to 32 for advanced copy to be used)
destinationArray  Byte
reference to teh destination byte array
size  Int32
size in bytes
destinationArrayOffset  Int32
When destination array is not aligned to 32, then it can be resized and destinationArrayOffset is set to the offset when the data start

Return Value

Boolean
true when non-temporal avx copy was used; false when standard memory copy is used
See Also