| AI Engine Intrinsics User Guide (AIE) v2025.2

Loading...
Searching...
No Matches
Pack
Intrinsics » Vector Conversions

Pack/unpack operations convert between two representations of vector types. More...

## Overview

Pack/unpack operations convert between two representations of vector types.

### Pack/unpack intrinsic functions

`Pack` a vector of 16-bit values to a vector of 8-bit values. Use put_mcd intrinsics for pack.
`Unpack` a vector 8-bit values to a vector of 16-bit values. For further details on unpack intrinsics, see the Updates page.

## Vector Packing Operations
v16int8 | pack (v16int16 vec)
| Pack vectors and store to memory These intrinsics use the saturation value from the control register here: Control Register. Rounding is not done. No status flags are updated. These intrinsics can only be used coupled with a memory access operation. Ex: v16int8* ptr = pack(vec);//vec if of type v16int16.
v16uint8 | upack (v16int16 vec)
| Pack vectors and store to memory These intrinsics use the saturation value from the control register here: Control Register. Rounding is not done. No status flags are updated. These intrinsics can only be used coupled with a memory access operation. Ex: v16int8* ptr = pack(vec);//vec if of type v16int16.
v32int8 | pack (v32int16 vec)
| Pack vectors and store to memory These intrinsics use the saturation value from the control register here: Control Register. Rounding is not done. No status flags are updated. These intrinsics can only be used coupled with a memory access operation. Ex: v16int8* ptr = pack(vec);//vec if of type v16int16.
v32uint8 | upack (v32int16 vec)
| Pack vectors and store to memory These intrinsics use the saturation value from the control register here: Control Register. Rounding is not done. No status flags are updated. These intrinsics can only be used coupled with a memory access operation. Ex: v16int8* ptr = pack(vec);//vec if of type v16int16.

## Function Documentation

## ◆ pack() [1/2]

v16int8 pack | ( | v16int16 | vec | ) |

Pack vectors and store to memory These intrinsics use the saturation value from the control register here: Control Register. Rounding is not done. No status flags are updated. These intrinsics can only be used coupled with a memory access operation. Ex: v16int8* ptr = pack(vec);//vec if of type v16int16.

## ◆ pack() [2/2]

v32int8 pack | ( | v32int16 | vec | ) |

Pack vectors and store to memory These intrinsics use the saturation value from the control register here: Control Register. Rounding is not done. No status flags are updated. These intrinsics can only be used coupled with a memory access operation. Ex: v16int8* ptr = pack(vec);//vec if of type v16int16.

## ◆ upack() [1/2]

v16uint8 upack | ( | v16int16 | vec | ) |

Pack vectors and store to memory These intrinsics use the saturation value from the control register here: Control Register. Rounding is not done. No status flags are updated. These intrinsics can only be used coupled with a memory access operation. Ex: v16int8* ptr = pack(vec);//vec if of type v16int16.

## ◆ upack() [2/2]

v32uint8 upack | ( | v32int16 | vec | ) |

Pack vectors and store to memory These intrinsics use the saturation value from the control register here: Control Register. Rounding is not done. No status flags are updated. These intrinsics can only be used coupled with a memory access operation. Ex: v16int8* ptr = pack(vec);//vec if of type v16int16.