# shz_memcpy32

Source: https://sh4zam.com/api/memory/shz_memcpy32/

> Copies bytes from the src to the dst buffer in 32-byte chunks

```c
SHZ_INLINE void* shz_memcpy32( void* SHZ_RESTRICT dst, const void* SHZ_RESTRICT src, size_t bytes) SHZ_NOEXCEPT;
```

Copies `bytes` from the `src` to the `dst` buffer in 32-byte chunks.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `dst` | `void *SHZ_RESTRICT` |  |
| `src` | `const void *SHZ_RESTRICT` |  |
| `bytes` | `size_t` |  |

## Returns

`void *`

## Details

Transfers from 8-byte aligned buffer, `src` to 32-byte aligned buffer, `dst`, 32 bytes at a time. Returns the `dst` address.

## Notes

- This is the quickest way to move 32-byte chunks of data around *within memory*, but the `shz_sq_memcpy32()` will be faster when writing through the cache to external memory.

## Warnings

- `dst` must be 32-byte aligned, while `src` can be only 8-byte aligned. `bytes` must be a multiple of 32.
- `src` and `dst` buffers must not overlap.

## Availability

- **C++ equivalent:** [`shz::memcpy32`](https://sh4zam.com/api/cpp/#shzmemcpy32)
- **Type-generic form:** none
- **Back-ends:** SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_mem.h:189`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_mem.h#L189)
- **Module:** [Memory](https://sh4zam.com/api/memory/), section "Specializations"

## See also

[`shz_sq_memcpy32`](https://sh4zam.com/api/memory/shz_sq_memcpy32/)
