Skip to main content
Log in

Mojo function

memcpy

memcpy[count: Int](dest: UnsafePointer[T, address_space, exclusive, alignment], src: UnsafePointer[T, address_space, exclusive, alignment])

Copies a memory area.

Parameters:

  • ​count (Int): The number of elements to copy (not bytes!).

Args:

  • ​dest (UnsafePointer[T, address_space, exclusive, alignment]): The destination pointer.
  • ​src (UnsafePointer[T, address_space, exclusive, alignment]): The source pointer.

memcpy(dest_data: UnsafePointer[SIMD[int8, 1], address_space, exclusive, alignment], src_data: UnsafePointer[SIMD[int8, 1], address_space, exclusive, alignment], n: Int)

Copies a memory area.

Args:

  • ​dest_data (UnsafePointer[SIMD[int8, 1], address_space, exclusive, alignment]): The destination pointer.
  • ​src_data (UnsafePointer[SIMD[int8, 1], address_space, exclusive, alignment]): The source pointer.
  • ​n (Int): The number of bytes to copy.

memcpy(dest: UnsafePointer[T, address_space, exclusive, alignment], src: UnsafePointer[T, address_space, exclusive, alignment], count: Int)

Copies a memory area.

Args:

  • ​dest (UnsafePointer[T, address_space, exclusive, alignment]): The destination pointer.
  • ​src (UnsafePointer[T, address_space, exclusive, alignment]): The source pointer.
  • ​count (Int): The number of elements to copy.

Was this page helpful?