1mlib_VectorMulShift_U8_Mod(m3eMdLiIaBL)ib Library Funmcltiibo_nVsectorMulShift_U8_Mod(3MLIB)
2
3
4
6 mlib_VectorMulShift_U8_Mod, mlib_VectorMulShift_U8_Sat, mlib_VectorMul‐
7 Shift_U8C_Mod, mlib_VectorMulShift_U8C_Sat, mlib_VectorMulShift_S8_Mod,
8 mlib_VectorMulShift_S8_Sat, mlib_VectorMulShift_S8C_Mod, mlib_Vector‐
9 MulShift_S8C_Sat, mlib_VectorMulShift_S16_Mod, mlib_VectorMul‐
10 Shift_S16_Sat, mlib_VectorMulShift_S16C_Mod, mlib_VectorMul‐
11 Shift_S16C_Sat, mlib_VectorMulShift_S32_Mod, mlib_VectorMul‐
12 Shift_S32_Sat, mlib_VectorMulShift_S32C_Mod, mlib_VectorMul‐
13 Shift_S32C_Sat - vector multiplication with shifting, in place
14
16 cc [ flag... ] file... -lmlib [ library... ]
17 #include <mlib.h>
18
19 mlib_status mlib_VectorMulShift_U8_Mod(mlib_u8 *xz,
20 const mlib_u8 *y, mlib_s32 n, mlib_s32 shift);
21
22
23 mlib_status mlib_VectorMulShift_U8_Sat(mlib_u8 *xz,
24 const mlib_u8 *y, mlib_s32 n, mlib_s32 shift);
25
26
27 mlib_status mlib_VectorMulShift_U8C_Mod(mlib_u8 *xz,
28 const mlib_u8 *y, mlib_s32 n, mlib_s32 shift);
29
30
31 mlib_status mlib_VectorMulShift_U8C_Sat(mlib_u8 *xz,
32 const mlib_u8 *y, mlib_s32 n, mlib_s32 shift);
33
34
35 mlib_status mlib_VectorMulShift_S8_Mod(mlib_s8 *xz,
36 const mlib_s8 *y, mlib_s32 n, mlib_s32 shift);
37
38
39 mlib_status mlib_VectorMulShift_S8_Sat(mlib_s8 *xz,
40 const mlib_s8 *y, mlib_s32 n, mlib_s32 shift);
41
42
43 mlib_status mlib_VectorMulShift_S8C_Mod(mlib_s8 *xz,
44 const mlib_s8 *y, mlib_s32 n, mlib_s32 shift);
45
46
47 mlib_status mlib_VectorMulShift_S8C_Sat(mlib_s8 *xz,
48 const mlib_s8 *y, mlib_s32 n, mlib_s32 shift);
49
50
51 mlib_status mlib_VectorMulShift_S16_Mod(mlib_s16 *xz,
52 const mlib_s16 *y, mlib_s32 n, mlib_s32 shift);
53
54
55 mlib_status mlib_VectorMulShift_S16_Sat(mlib_s16 *xz,
56 const mlib_s16 *y, mlib_s32 n, mlib_s32 shift);
57
58
59 mlib_status mlib_VectorMulShift_S16C_Mod(mlib_s16 *xz,
60 const mlib_s16 *y, mlib_s32 n, mlib_s32 shift);
61
62
63 mlib_status mlib_VectorMulShift_S16C_Sat(mlib_s16 *xz,
64 const mlib_s16 *y, mlib_s32 n, mlib_s32 shift);
65
66
67 mlib_status mlib_VectorMulShift_S32_Mod(mlib_s32 *xz,
68 const mlib_s32 *y, mlib_s32 n, mlib_s32 shift);
69
70
71 mlib_status mlib_VectorMulShift_S32_Sat(mlib_s32 *xz,
72 const mlib_s32 *y, mlib_s32 n, mlib_s32 shift);
73
74
75 mlib_status mlib_VectorMulShift_S32C_Mod(mlib_s32 *xz,
76 const mlib_s32 *y, mlib_s32 n, mlib_s32 shift);
77
78
79 mlib_status mlib_VectorMulShift_S32C_Sat(mlib_s32 *xz,
80 const mlib_s32 *y, mlib_s32 n, mlib_s32 shift);
81
82
84 Each of these functions performs an in-place multiplication of two vec‐
85 tors and shifts the result.
86
87
88 For real data, the following equation is used:
89
90 xz[i] = xz[i] * y[i] * 2**(-shift)
91
92
93
94 where i = 0, 1, ..., (n - 1).
95
96
97 For complex data, the following equation is used:
98
99 tmp = xz[2*i]
100 xz[2*i] = (tmp*y[2*i] - xz[2*i + 1]*y[2*i + 1]) * 2**(-shift)
101 xz[2*i + 1] = (tmp*y[2*i + 1] + xz[2*i + 1]*y[2*i]) * 2**(-shift)
102
103
104
105 where i = 0, 1, ..., (n - 1).
106
108 Each of the functions takes the following arguments:
109
110 xz Pointer to the first element of the first source and result
111 vector.
112
113
114 y Pointer to the first element of the second source vector.
115
116
117 n Number of elements in each vector.
118
119
120 shift Right shifting factor. The ranges of valid shift are:
121
122 1 ≤ shift ≤ 8 for U8, S8, U8C, S8C types
123 1 ≤ shift ≤ 16 for S16, S16C types
124 1 ≤ shift ≤ 31 for S32, S32C types
125
126
127
129 Each of the functions returns MLIB_SUCCESS if successful. Otherwise it
130 returns MLIB_FAILURE.
131
133 See attributes(5) for descriptions of the following attributes:
134
135
136
137
138 ┌─────────────────────────────┬─────────────────────────────┐
139 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
140 ├─────────────────────────────┼─────────────────────────────┤
141 │Interface Stability │Committed │
142 ├─────────────────────────────┼─────────────────────────────┤
143 │MT-Level │MT-Safe │
144 └─────────────────────────────┴─────────────────────────────┘
145
147 mlib_VectorMulShift_U8_U8_Mod(3MLIB), attributes(5)
148
149
150
151SunOS 5.11 2 Mar 2007 mlib_VectorMulShift_U8_Mod(3MLIB)