# shz_xmtrx_store_aligned32_4x4

Source: https://sh4zam.com/api/xmtrx/shz_xmtrx_store_aligned32_4x4/

```c
SHZ_INLINE void shz_xmtrx_store_aligned32_4x4(shz_mat4x4_t* matrix) SHZ_NOEXCEPT;
```

Stores the current values held within XMTRX into the given 32-byte aligned 4x4 matrix.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | `shz_mat4x4_t *` | 32-byte aligned matrix to store XMTRX into. |

## Returns

Nothing (`void`).

## Details

Equivalent to `shz_xmtrx_store_4x4()`, except that the destination's two cache lines are preallocated rather than being fetched from memory first. This drastically reduces the pipeline stall penalties when `matrix` is not within the cache.

## Warnings

- `matrix` must be 32-byte aligned. Both 32-byte cache lines it spans are allocated without being read on SH4, so any other data sharing those lines is lost.

## Naming and requirements

- `shz_mat4x4_t` and `shz_mat2x2_t` arguments must be 8-byte aligned. Unaligned data goes through the `float[16]` parameters of the `_unaligned` routines.

## Availability

- **C++ equivalent:** [`shz::xmtrx::store_aligned32`](https://sh4zam.com/api/cpp/xmtrx/#store_aligned32)
- **Type-generic form:** none
- **Back-ends:** SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_xmtrx.h:221`](https://github.com/gyrovorbis/sh4zam/blob/6b22b851ad9ca109049f956dbbbecf7c519c959f/include/sh4zam/shz_xmtrx.h#L221)
- **Module:** [XMTRX](https://sh4zam.com/api/xmtrx/), section "Storing"

## See also

[`shz_xmtrx_store_4x4`](https://sh4zam.com/api/xmtrx/shz_xmtrx_store_4x4/)
