vgather
功能说明
该指令从src地址中获取N个地址,然后访问这些地址(加上偏移地址)以获取N个B16或B32元素,最后将这些N个元素连续写入目的地址。需要注意的是,src中存储的N个地址可能包含重复地址,并且是连续存储在UB中的,每个地址的类型为s32。其对应地址所指向的每个元素宽度为16位或32位,具体取决于类型:
- 当类型为b16时,N的值为128;
- 当类型为b32时,N的值为64。
接口原型
void vgather(__ubuf__ uint32_t *dst, __ubuf__ uint32_t *src, uint64_t config); void vgather(__ubuf__ uint16_t *dst, __ubuf__ uint32_t *src, uint32_t offsetAddr, uint16_t dstRepeatStride, uint8_t repeat); void vgather(__ubuf__ uint32_t *dst, __ubuf__ uint32_t *src, uint32_t offsetAddr, uint16_t dstRepeatStride, uint8_t repeat); void vgather(__ubuf__ uint16_t *dst, __ubuf__ uint32_t *src, uint64_t config);
参数说明
参数名 |
说明 |
取值范围 |
单位 |
---|---|---|---|
dst |
目的UB地址 |
/ |
/ |
src |
源UB地址 |
/ |
/ |
offsetAddr |
源地址起始偏移量 |
[0, 2^32-1] |
elem |
dstRepeatStride |
相邻两次执行,目的操作数相同block地址步长 |
[0, 4095] |
32B |
repeat |
指令迭代次数 |
/ |
/ |
流水类型
PIPE_V
父主题: UB内搬移