Source file src/simd/archsimd/deprecated_wasm.go
1 // Copyright 2026 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build goexperiment.simd && wasm 6 7 package archsimd 8 9 // Deprecated operations that are wrappers around their replacements. 10 11 // GetElem returns the i'th element of x. 12 // 13 // Deprecated: use x.Elem(i) instead. 14 // 15 //go:fix inline 16 func (x Int8x16) GetElem(i uint8) (z int8) { 17 return x.Elem(i) 18 } 19 20 // GetElem returns the i'th element of x. 21 // 22 // Deprecated: use x.Elem(i) instead. 23 // 24 //go:fix inline 25 func (x Uint8x16) GetElem(i uint8) (z uint8) { 26 return x.Elem(i) 27 } 28 29 // GetElem returns the i'th element of x. 30 // 31 // Deprecated: use x.Elem(i) instead. 32 // 33 //go:fix inline 34 func (x Int16x8) GetElem(i uint8) (z int16) { 35 return x.Elem(i) 36 } 37 38 // GetElem returns the i'th element of x. 39 // 40 // Deprecated: use x.Elem(i) instead. 41 // 42 //go:fix inline 43 func (x Uint16x8) GetElem(i uint8) (z uint16) { 44 return x.Elem(i) 45 } 46 47 // GetElem returns the i'th element of x. 48 // 49 // Deprecated: use x.Elem(i) instead. 50 // 51 //go:fix inline 52 func (x Int32x4) GetElem(i uint8) (z int32) { 53 return x.Elem(i) 54 } 55 56 // GetElem returns the i'th element of x. 57 // 58 // Deprecated: use x.Elem(i) instead. 59 // 60 //go:fix inline 61 func (x Uint32x4) GetElem(i uint8) (z uint32) { 62 return x.Elem(i) 63 } 64 65 // GetElem returns the i'th element of x. 66 // 67 // Deprecated: use x.Elem(i) instead. 68 // 69 //go:fix inline 70 func (x Float32x4) GetElem(i uint8) (z float32) { 71 return x.Elem(i) 72 } 73 74 // GetElem returns the i'th element of x. 75 // 76 // Deprecated: use x.Elem(i) instead. 77 // 78 //go:fix inline 79 func (x Int64x2) GetElem(i uint8) (z int64) { 80 return x.Elem(i) 81 } 82 83 // GetElem returns the i'th element of x. 84 // 85 // Deprecated: use x.Elem(i) instead. 86 // 87 //go:fix inline 88 func (x Uint64x2) GetElem(i uint8) (z uint64) { 89 return x.Elem(i) 90 } 91 92 // GetElem returns the i'th element of x. 93 // 94 // Deprecated: use x.Elem(i) instead. 95 // 96 //go:fix inline 97 func (x Float64x2) GetElem(i uint8) (z float64) { 98 return x.Elem(i) 99 } 100 101 // CarrylessMultiplyEven computes the carryless multiplication of 102 // the even-indexed elements of x and y. 103 // 104 // Deprecated: use x.CarrylessMulEven(y) instead. 105 // 106 //go:fix inline 107 func (x Uint64x2) CarrylessMultiplyEven(y Uint64x2) (z Uint64x2) { 108 return x.CarrylessMulEven(y) 109 } 110 111 // CarrylessMultiplyOdd computes the carryless multiplication of 112 // the odd-indexed elements of x and y. 113 // 114 // Deprecated: use x.CarrylessMulOdd(y) instead. 115 // 116 //go:fix inline 117 func (x Uint64x2) CarrylessMultiplyOdd(y Uint64x2) (z Uint64x2) { 118 return x.CarrylessMulOdd(y) 119 } 120 121 // CarrylessMultiplyEvenOdd computes the carryless multiplication of 122 // the even-indexed elements of x and the odd-indexed elements of y. 123 // 124 // Deprecated: use x.CarrylessMulEvenOdd(y) instead. 125 // 126 //go:fix inline 127 func (x Uint64x2) CarrylessMultiplyEvenOdd(y Uint64x2) (z Uint64x2) { 128 return x.CarrylessMulEvenOdd(y) 129 } 130 131 // CarrylessMultiplyOddEven computes the carryless multiplication of 132 // the odd-indexed elements of x and the even-indexed elements of y. 133 // 134 // Deprecated: use x.CarrylessMulOddEven(y) instead. 135 // 136 //go:fix inline 137 func (x Uint64x2) CarrylessMultiplyOddEven(y Uint64x2) (z Uint64x2) { 138 return x.CarrylessMulOddEven(y) 139 } 140 141 // MulWidenLo multiplies corresponding elements in the lower half of x and y, 142 // returning a vector of half as many elements, each with twice the input 143 // element size. 144 // 145 // z[i] = int16(x[i]) * int16(y[i]) 146 // 147 // Deprecated: use x.MulWiden(y) instead. 148 // 149 //go:fix inline 150 func (x Int8x16) MulWidenLo(y Int8x16) (z Int16x8) { 151 return x.MulWiden(y) 152 } 153 154 // MulWidenLo multiplies corresponding elements in the lower half of x and y, 155 // returning a vector of half as many elements, each with twice the input 156 // element size. 157 // 158 // z[i] = int32(x[i]) * int32(y[i]) 159 // 160 // Deprecated: use x.MulWiden(y) instead. 161 // 162 //go:fix inline 163 func (x Int16x8) MulWidenLo(y Int16x8) (z Int32x4) { 164 return x.MulWiden(y) 165 } 166 167 // MulWidenLo multiplies corresponding elements in the lower half of x and y, 168 // returning a vector of half as many elements, each with twice the input 169 // element size. 170 // 171 // z[i] = int64(x[i]) * int64(y[i]) 172 // 173 // Deprecated: use x.MulWiden(y) instead. 174 // 175 //go:fix inline 176 func (x Int32x4) MulWidenLo(y Int32x4) (z Int64x2) { 177 return x.MulWiden(y) 178 } 179 180 // MulWidenLo multiplies corresponding elements in the lower half of x and y, 181 // returning a vector of half as many elements, each with twice the input 182 // element size. 183 // 184 // z[i] = uint16(x[i]) * uint16(y[i]) 185 // 186 // Deprecated: use x.MulWiden(y) instead. 187 // 188 //go:fix inline 189 func (x Uint8x16) MulWidenLo(y Uint8x16) (z Uint16x8) { 190 return x.MulWiden(y) 191 } 192 193 // MulWidenLo multiplies corresponding elements in the lower half of x and y, 194 // returning a vector of half as many elements, each with twice the input 195 // element size. 196 // 197 // z[i] = uint32(x[i]) * uint32(y[i]) 198 // 199 // Deprecated: use x.MulWiden(y) instead. 200 // 201 //go:fix inline 202 func (x Uint16x8) MulWidenLo(y Uint16x8) (z Uint32x4) { 203 return x.MulWiden(y) 204 } 205 206 // MulWidenLo multiplies corresponding elements in the lower half of x and y, 207 // returning a vector of half as many elements, each with twice the input 208 // element size. 209 // 210 // z[i] = uint64(x[i]) * uint64(y[i]) 211 // 212 // Deprecated: use x.MulWiden(y) instead. 213 // 214 //go:fix inline 215 func (x Uint32x4) MulWidenLo(y Uint32x4) (z Uint64x2) { 216 return x.MulWiden(y) 217 } 218 219 // MulWidenHi multiplies corresponding elements in the upper half of x and y, 220 // returning a vector of half as many elements, each with twice the input 221 // element size. 222 // 223 // z[i] = int16(x[8+i]) * int16(y[8+i]) 224 // 225 // Deprecated: use x.HiToLo().MulWiden(y.HiToLo()) instead, which compiles to 226 // the same single instruction. 227 // 228 //go:fix inline 229 func (x Int8x16) MulWidenHi(y Int8x16) (z Int16x8) { 230 return x.HiToLo().MulWiden(y.HiToLo()) 231 } 232 233 // MulWidenHi multiplies corresponding elements in the upper half of x and y, 234 // returning a vector of half as many elements, each with twice the input 235 // element size. 236 // 237 // z[i] = uint16(x[8+i]) * uint16(y[8+i]) 238 // 239 // Deprecated: use x.HiToLo().MulWiden(y.HiToLo()) instead, which compiles to 240 // the same single instruction. 241 // 242 //go:fix inline 243 func (x Uint8x16) MulWidenHi(y Uint8x16) (z Uint16x8) { 244 return x.HiToLo().MulWiden(y.HiToLo()) 245 } 246 247 // MulWidenHi multiplies corresponding elements in the upper half of x and y, 248 // returning a vector of half as many elements, each with twice the input 249 // element size. 250 // 251 // z[i] = int32(x[4+i]) * int32(y[4+i]) 252 // 253 // Deprecated: use x.HiToLo().MulWiden(y.HiToLo()) instead, which compiles to 254 // the same single instruction. 255 // 256 //go:fix inline 257 func (x Int16x8) MulWidenHi(y Int16x8) (z Int32x4) { 258 return x.HiToLo().MulWiden(y.HiToLo()) 259 } 260 261 // MulWidenHi multiplies corresponding elements in the upper half of x and y, 262 // returning a vector of half as many elements, each with twice the input 263 // element size. 264 // 265 // z[i] = uint32(x[4+i]) * uint32(y[4+i]) 266 // 267 // Deprecated: use x.HiToLo().MulWiden(y.HiToLo()) instead, which compiles to 268 // the same single instruction. 269 // 270 //go:fix inline 271 func (x Uint16x8) MulWidenHi(y Uint16x8) (z Uint32x4) { 272 return x.HiToLo().MulWiden(y.HiToLo()) 273 } 274 275 // MulWidenHi multiplies corresponding elements in the upper half of x and y, 276 // returning a vector of half as many elements, each with twice the input 277 // element size. 278 // 279 // z[i] = int64(x[2+i]) * int64(y[2+i]) 280 // 281 // Deprecated: use x.HiToLo().MulWiden(y.HiToLo()) instead, which compiles to 282 // the same single instruction. 283 // 284 //go:fix inline 285 func (x Int32x4) MulWidenHi(y Int32x4) (z Int64x2) { 286 return x.HiToLo().MulWiden(y.HiToLo()) 287 } 288 289 // MulWidenHi multiplies corresponding elements in the upper half of x and y, 290 // returning a vector of half as many elements, each with twice the input 291 // element size. 292 // 293 // z[i] = uint64(x[2+i]) * uint64(y[2+i]) 294 // 295 // Deprecated: use x.HiToLo().MulWiden(y.HiToLo()) instead, which compiles to 296 // the same single instruction. 297 // 298 //go:fix inline 299 func (x Uint32x4) MulWidenHi(y Uint32x4) (z Uint64x2) { 300 return x.HiToLo().MulWiden(y.HiToLo()) 301 } 302