Memory |
The MemoryUtils type exposes the following members.
Name | Description | |
---|---|---|
AlignPtrTo32 | Aligns the specified pointer to 32 bytes (if not already aligned then the ptr address is increased to the next aligned address). The method returns the addressOffset (if more than 0 then the ptr address is increased that offset). | |
AlignValueTo32 | Aligns the specified value to 32 bytes (if not already aligned then the value is increased to the next aligned value). The method returns the valueOffset (if more than 0 then the value was increased by that offset). | |
Copy(IntPtr, IntPtr, Int32) | Copy memory size bytes from source to destination. This method can also set the if it was not set before. | |
Copy(IntPtr, IntPtr, Int32, Byte) | Copy memory size bytes from source to destination. In case the destination is not aligned to 32, the tempByteArray may be used / created as a temporary storage. This method can also set the if it was not set before. | |
CopyMemoryNonTemporalAvx | When source and destination are aligned to 32, then non-temporal avx copy was performed. | |
CopyToArray | 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. | |
IsAlignedTo32 | Returns true when the specified memory address is aligned to 32. |