huahuayuanyuan · 2023年10月10日 · 中国

周易Compass C编程指南中的内置函数疑问?

有些函数没有提供示例图,存在一些疑问,求解答!!!
1、__vdpsz函数中参数acc是当被减数还是减数?下图是我理解的示意图
Predicated by the predication variable p, multiplies every two
adjacent active elements of tensor variable x with the corresponding elements of y, adds the multiply results, and then performs an accumulate subtract operation with corresponding active elements of tensor variable acc and return acc. Inactive elements in the return tensor variable are set to zero
image.png

2、__vqdpaz函数是每相邻四个元素做运算,返回结果result是怎么存储的?下图是我理解的计算方法正确吗?
Predicated by the predication variable p, multiplies every four
adjacent active elements of tensor variable x with the corresponding elements of y, adds the multiply results, and then performs an accumulate add operation with corresponding active elements of tensor variable acc and return acc. Inactive elements in the return tensor variable are set to zero.
image.png

3、__vinsert函数中拷贝y的最低有效位(least-significant bits)是指bit0吗?
Places a copy of the least-significant bits of scalar variable y into the element with a specified index of tensor variable x. The index is indicated by z. Other elements in tensor variable x are unchanged.

4、__vsxtl函数按符号扩展元素2倍大小是16位变32位,bit31变符号位吗?
Sign-extends the low half elements of tensor variable x to the
double size.
v8int32_t__vsxtl(v16int16_t x);

5、__vuxtl函数按零扩展元素2倍大小是16位变32位,高16位为0吗?
Zero-extends the low half elements of tensor variable x to the
double size.
v8uint32_t__vuxtl(v16uint16_t x);

你的回答