Source file src/simd/archsimd/other_gen_amd64.go

     1  // Code generated by 'tmplgen'; DO NOT EDIT.
     2  
     3  //go:build goexperiment.simd
     4  
     5  package archsimd
     6  
     7  // BroadcastInt8x16 returns a vector with the input
     8  // x assigned to all elements of the output.
     9  //
    10  // Emulated, CPU Feature: AVX2
    11  func BroadcastInt8x16(x int8) Int8x16 {
    12  	var z Int8x16
    13  	return z.SetElem(0, x).broadcast1To16()
    14  }
    15  
    16  // BroadcastInt16x8 returns a vector with the input
    17  // x assigned to all elements of the output.
    18  //
    19  // Emulated, CPU Feature: AVX2
    20  func BroadcastInt16x8(x int16) Int16x8 {
    21  	var z Int16x8
    22  	return z.SetElem(0, x).broadcast1To8()
    23  }
    24  
    25  // BroadcastInt32x4 returns a vector with the input
    26  // x assigned to all elements of the output.
    27  //
    28  // Emulated, CPU Feature: AVX2
    29  func BroadcastInt32x4(x int32) Int32x4 {
    30  	var z Int32x4
    31  	return z.SetElem(0, x).broadcast1To4()
    32  }
    33  
    34  // BroadcastInt64x2 returns a vector with the input
    35  // x assigned to all elements of the output.
    36  //
    37  // Emulated, CPU Feature: AVX2
    38  func BroadcastInt64x2(x int64) Int64x2 {
    39  	var z Int64x2
    40  	return z.SetElem(0, x).broadcast1To2()
    41  }
    42  
    43  // BroadcastUint8x16 returns a vector with the input
    44  // x assigned to all elements of the output.
    45  //
    46  // Emulated, CPU Feature: AVX2
    47  func BroadcastUint8x16(x uint8) Uint8x16 {
    48  	var z Uint8x16
    49  	return z.SetElem(0, x).broadcast1To16()
    50  }
    51  
    52  // BroadcastUint16x8 returns a vector with the input
    53  // x assigned to all elements of the output.
    54  //
    55  // Emulated, CPU Feature: AVX2
    56  func BroadcastUint16x8(x uint16) Uint16x8 {
    57  	var z Uint16x8
    58  	return z.SetElem(0, x).broadcast1To8()
    59  }
    60  
    61  // BroadcastUint32x4 returns a vector with the input
    62  // x assigned to all elements of the output.
    63  //
    64  // Emulated, CPU Feature: AVX2
    65  func BroadcastUint32x4(x uint32) Uint32x4 {
    66  	var z Uint32x4
    67  	return z.SetElem(0, x).broadcast1To4()
    68  }
    69  
    70  // BroadcastUint64x2 returns a vector with the input
    71  // x assigned to all elements of the output.
    72  //
    73  // Emulated, CPU Feature: AVX2
    74  func BroadcastUint64x2(x uint64) Uint64x2 {
    75  	var z Uint64x2
    76  	return z.SetElem(0, x).broadcast1To2()
    77  }
    78  
    79  // BroadcastFloat32x4 returns a vector with the input
    80  // x assigned to all elements of the output.
    81  //
    82  // Emulated, CPU Feature: AVX2
    83  func BroadcastFloat32x4(x float32) Float32x4 {
    84  	var z Float32x4
    85  	return z.SetElem(0, x).broadcast1To4()
    86  }
    87  
    88  // BroadcastFloat64x2 returns a vector with the input
    89  // x assigned to all elements of the output.
    90  //
    91  // Emulated, CPU Feature: AVX2
    92  func BroadcastFloat64x2(x float64) Float64x2 {
    93  	var z Float64x2
    94  	return z.SetElem(0, x).broadcast1To2()
    95  }
    96  
    97  // BroadcastInt8x32 returns a vector with the input
    98  // x assigned to all elements of the output.
    99  //
   100  // Emulated, CPU Feature: AVX2
   101  func BroadcastInt8x32(x int8) Int8x32 {
   102  	var z Int8x16
   103  	return z.SetElem(0, x).broadcast1To32()
   104  }
   105  
   106  // BroadcastInt16x16 returns a vector with the input
   107  // x assigned to all elements of the output.
   108  //
   109  // Emulated, CPU Feature: AVX2
   110  func BroadcastInt16x16(x int16) Int16x16 {
   111  	var z Int16x8
   112  	return z.SetElem(0, x).broadcast1To16()
   113  }
   114  
   115  // BroadcastInt32x8 returns a vector with the input
   116  // x assigned to all elements of the output.
   117  //
   118  // Emulated, CPU Feature: AVX2
   119  func BroadcastInt32x8(x int32) Int32x8 {
   120  	var z Int32x4
   121  	return z.SetElem(0, x).broadcast1To8()
   122  }
   123  
   124  // BroadcastInt64x4 returns a vector with the input
   125  // x assigned to all elements of the output.
   126  //
   127  // Emulated, CPU Feature: AVX2
   128  func BroadcastInt64x4(x int64) Int64x4 {
   129  	var z Int64x2
   130  	return z.SetElem(0, x).broadcast1To4()
   131  }
   132  
   133  // BroadcastUint8x32 returns a vector with the input
   134  // x assigned to all elements of the output.
   135  //
   136  // Emulated, CPU Feature: AVX2
   137  func BroadcastUint8x32(x uint8) Uint8x32 {
   138  	var z Uint8x16
   139  	return z.SetElem(0, x).broadcast1To32()
   140  }
   141  
   142  // BroadcastUint16x16 returns a vector with the input
   143  // x assigned to all elements of the output.
   144  //
   145  // Emulated, CPU Feature: AVX2
   146  func BroadcastUint16x16(x uint16) Uint16x16 {
   147  	var z Uint16x8
   148  	return z.SetElem(0, x).broadcast1To16()
   149  }
   150  
   151  // BroadcastUint32x8 returns a vector with the input
   152  // x assigned to all elements of the output.
   153  //
   154  // Emulated, CPU Feature: AVX2
   155  func BroadcastUint32x8(x uint32) Uint32x8 {
   156  	var z Uint32x4
   157  	return z.SetElem(0, x).broadcast1To8()
   158  }
   159  
   160  // BroadcastUint64x4 returns a vector with the input
   161  // x assigned to all elements of the output.
   162  //
   163  // Emulated, CPU Feature: AVX2
   164  func BroadcastUint64x4(x uint64) Uint64x4 {
   165  	var z Uint64x2
   166  	return z.SetElem(0, x).broadcast1To4()
   167  }
   168  
   169  // BroadcastFloat32x8 returns a vector with the input
   170  // x assigned to all elements of the output.
   171  //
   172  // Emulated, CPU Feature: AVX2
   173  func BroadcastFloat32x8(x float32) Float32x8 {
   174  	var z Float32x4
   175  	return z.SetElem(0, x).broadcast1To8()
   176  }
   177  
   178  // BroadcastFloat64x4 returns a vector with the input
   179  // x assigned to all elements of the output.
   180  //
   181  // Emulated, CPU Feature: AVX2
   182  func BroadcastFloat64x4(x float64) Float64x4 {
   183  	var z Float64x2
   184  	return z.SetElem(0, x).broadcast1To4()
   185  }
   186  
   187  // BroadcastInt8x64 returns a vector with the input
   188  // x assigned to all elements of the output.
   189  //
   190  // Emulated, CPU Feature: AVX512BW
   191  func BroadcastInt8x64(x int8) Int8x64 {
   192  	var z Int8x16
   193  	return z.SetElem(0, x).broadcast1To64()
   194  }
   195  
   196  // BroadcastInt16x32 returns a vector with the input
   197  // x assigned to all elements of the output.
   198  //
   199  // Emulated, CPU Feature: AVX512BW
   200  func BroadcastInt16x32(x int16) Int16x32 {
   201  	var z Int16x8
   202  	return z.SetElem(0, x).broadcast1To32()
   203  }
   204  
   205  // BroadcastInt32x16 returns a vector with the input
   206  // x assigned to all elements of the output.
   207  //
   208  // Emulated, CPU Feature: AVX512F
   209  func BroadcastInt32x16(x int32) Int32x16 {
   210  	var z Int32x4
   211  	return z.SetElem(0, x).broadcast1To16()
   212  }
   213  
   214  // BroadcastInt64x8 returns a vector with the input
   215  // x assigned to all elements of the output.
   216  //
   217  // Emulated, CPU Feature: AVX512F
   218  func BroadcastInt64x8(x int64) Int64x8 {
   219  	var z Int64x2
   220  	return z.SetElem(0, x).broadcast1To8()
   221  }
   222  
   223  // BroadcastUint8x64 returns a vector with the input
   224  // x assigned to all elements of the output.
   225  //
   226  // Emulated, CPU Feature: AVX512BW
   227  func BroadcastUint8x64(x uint8) Uint8x64 {
   228  	var z Uint8x16
   229  	return z.SetElem(0, x).broadcast1To64()
   230  }
   231  
   232  // BroadcastUint16x32 returns a vector with the input
   233  // x assigned to all elements of the output.
   234  //
   235  // Emulated, CPU Feature: AVX512BW
   236  func BroadcastUint16x32(x uint16) Uint16x32 {
   237  	var z Uint16x8
   238  	return z.SetElem(0, x).broadcast1To32()
   239  }
   240  
   241  // BroadcastUint32x16 returns a vector with the input
   242  // x assigned to all elements of the output.
   243  //
   244  // Emulated, CPU Feature: AVX512F
   245  func BroadcastUint32x16(x uint32) Uint32x16 {
   246  	var z Uint32x4
   247  	return z.SetElem(0, x).broadcast1To16()
   248  }
   249  
   250  // BroadcastUint64x8 returns a vector with the input
   251  // x assigned to all elements of the output.
   252  //
   253  // Emulated, CPU Feature: AVX512F
   254  func BroadcastUint64x8(x uint64) Uint64x8 {
   255  	var z Uint64x2
   256  	return z.SetElem(0, x).broadcast1To8()
   257  }
   258  
   259  // BroadcastFloat32x16 returns a vector with the input
   260  // x assigned to all elements of the output.
   261  //
   262  // Emulated, CPU Feature: AVX512F
   263  func BroadcastFloat32x16(x float32) Float32x16 {
   264  	var z Float32x4
   265  	return z.SetElem(0, x).broadcast1To16()
   266  }
   267  
   268  // BroadcastFloat64x8 returns a vector with the input
   269  // x assigned to all elements of the output.
   270  //
   271  // Emulated, CPU Feature: AVX512F
   272  func BroadcastFloat64x8(x float64) Float64x8 {
   273  	var z Float64x2
   274  	return z.SetElem(0, x).broadcast1To8()
   275  }
   276  
   277  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   278  func (from Int8x16) ToMask() (to Mask8x16) {
   279  	return from.NotEqual(Int8x16{})
   280  }
   281  
   282  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   283  func (from Int16x8) ToMask() (to Mask16x8) {
   284  	return from.NotEqual(Int16x8{})
   285  }
   286  
   287  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   288  func (from Int32x4) ToMask() (to Mask32x4) {
   289  	return from.NotEqual(Int32x4{})
   290  }
   291  
   292  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   293  func (from Int64x2) ToMask() (to Mask64x2) {
   294  	return from.NotEqual(Int64x2{})
   295  }
   296  
   297  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   298  func (from Int8x32) ToMask() (to Mask8x32) {
   299  	return from.NotEqual(Int8x32{})
   300  }
   301  
   302  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   303  func (from Int16x16) ToMask() (to Mask16x16) {
   304  	return from.NotEqual(Int16x16{})
   305  }
   306  
   307  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   308  func (from Int32x8) ToMask() (to Mask32x8) {
   309  	return from.NotEqual(Int32x8{})
   310  }
   311  
   312  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   313  func (from Int64x4) ToMask() (to Mask64x4) {
   314  	return from.NotEqual(Int64x4{})
   315  }
   316  
   317  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   318  func (from Int8x64) ToMask() (to Mask8x64) {
   319  	return from.NotEqual(Int8x64{})
   320  }
   321  
   322  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   323  func (from Int16x32) ToMask() (to Mask16x32) {
   324  	return from.NotEqual(Int16x32{})
   325  }
   326  
   327  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   328  func (from Int32x16) ToMask() (to Mask32x16) {
   329  	return from.NotEqual(Int32x16{})
   330  }
   331  
   332  // ToMask returns a mask whose i'th element is set if x[i] is non-zero.
   333  func (from Int64x8) ToMask() (to Mask64x8) {
   334  	return from.NotEqual(Int64x8{})
   335  }
   336  
   337  // Not returns the bitwise complement of x.
   338  //
   339  // Emulated, CPU Feature: AVX
   340  func (x Int8x16) Not() Int8x16 {
   341  	return x.Xor(x.Equal(x).ToInt8x16())
   342  }
   343  
   344  // Neg returns the element-wise negation of x.
   345  //
   346  // Emulated, CPU Feature: AVX
   347  func (x Int8x16) Neg() Int8x16 {
   348  	var zero Int8x16
   349  	return zero.Sub(x)
   350  }
   351  
   352  // Not returns the bitwise complement of x.
   353  //
   354  // Emulated, CPU Feature: AVX
   355  func (x Int16x8) Not() Int16x8 {
   356  	return x.Xor(x.Equal(x).ToInt16x8())
   357  }
   358  
   359  // Neg returns the element-wise negation of x.
   360  //
   361  // Emulated, CPU Feature: AVX
   362  func (x Int16x8) Neg() Int16x8 {
   363  	var zero Int16x8
   364  	return zero.Sub(x)
   365  }
   366  
   367  // Not returns the bitwise complement of x.
   368  //
   369  // Emulated, CPU Feature: AVX
   370  func (x Int32x4) Not() Int32x4 {
   371  	return x.Xor(x.Equal(x).ToInt32x4())
   372  }
   373  
   374  // Neg returns the element-wise negation of x.
   375  //
   376  // Emulated, CPU Feature: AVX
   377  func (x Int32x4) Neg() Int32x4 {
   378  	var zero Int32x4
   379  	return zero.Sub(x)
   380  }
   381  
   382  // Not returns the bitwise complement of x.
   383  //
   384  // Emulated, CPU Feature: AVX
   385  func (x Int64x2) Not() Int64x2 {
   386  	return x.Xor(x.Equal(x).ToInt64x2())
   387  }
   388  
   389  // Neg returns the element-wise negation of x.
   390  //
   391  // Emulated, CPU Feature: AVX
   392  func (x Int64x2) Neg() Int64x2 {
   393  	var zero Int64x2
   394  	return zero.Sub(x)
   395  }
   396  
   397  // Not returns the bitwise complement of x.
   398  //
   399  // Emulated, CPU Feature: AVX2
   400  func (x Int8x32) Not() Int8x32 {
   401  	return x.Xor(x.Equal(x).ToInt8x32())
   402  }
   403  
   404  // Neg returns the element-wise negation of x.
   405  //
   406  // Emulated, CPU Feature: AVX2
   407  func (x Int8x32) Neg() Int8x32 {
   408  	var zero Int8x32
   409  	return zero.Sub(x)
   410  }
   411  
   412  // Not returns the bitwise complement of x.
   413  //
   414  // Emulated, CPU Feature: AVX2
   415  func (x Int16x16) Not() Int16x16 {
   416  	return x.Xor(x.Equal(x).ToInt16x16())
   417  }
   418  
   419  // Neg returns the element-wise negation of x.
   420  //
   421  // Emulated, CPU Feature: AVX2
   422  func (x Int16x16) Neg() Int16x16 {
   423  	var zero Int16x16
   424  	return zero.Sub(x)
   425  }
   426  
   427  // Not returns the bitwise complement of x.
   428  //
   429  // Emulated, CPU Feature: AVX2
   430  func (x Int32x8) Not() Int32x8 {
   431  	return x.Xor(x.Equal(x).ToInt32x8())
   432  }
   433  
   434  // Neg returns the element-wise negation of x.
   435  //
   436  // Emulated, CPU Feature: AVX2
   437  func (x Int32x8) Neg() Int32x8 {
   438  	var zero Int32x8
   439  	return zero.Sub(x)
   440  }
   441  
   442  // Not returns the bitwise complement of x.
   443  //
   444  // Emulated, CPU Feature: AVX2
   445  func (x Int64x4) Not() Int64x4 {
   446  	return x.Xor(x.Equal(x).ToInt64x4())
   447  }
   448  
   449  // Neg returns the element-wise negation of x.
   450  //
   451  // Emulated, CPU Feature: AVX2
   452  func (x Int64x4) Neg() Int64x4 {
   453  	var zero Int64x4
   454  	return zero.Sub(x)
   455  }
   456  
   457  // Not returns the bitwise complement of x.
   458  //
   459  // Emulated, CPU Feature: AVX512
   460  func (x Int8x64) Not() Int8x64 {
   461  	return x.Xor(x.Equal(x).ToInt8x64())
   462  }
   463  
   464  // Neg returns the element-wise negation of x.
   465  //
   466  // Emulated, CPU Feature: AVX512
   467  func (x Int8x64) Neg() Int8x64 {
   468  	var zero Int8x64
   469  	return zero.Sub(x)
   470  }
   471  
   472  // Not returns the bitwise complement of x.
   473  //
   474  // Emulated, CPU Feature: AVX512
   475  func (x Int16x32) Not() Int16x32 {
   476  	return x.Xor(x.Equal(x).ToInt16x32())
   477  }
   478  
   479  // Neg returns the element-wise negation of x.
   480  //
   481  // Emulated, CPU Feature: AVX512
   482  func (x Int16x32) Neg() Int16x32 {
   483  	var zero Int16x32
   484  	return zero.Sub(x)
   485  }
   486  
   487  // Not returns the bitwise complement of x.
   488  //
   489  // Emulated, CPU Feature: AVX512
   490  func (x Int32x16) Not() Int32x16 {
   491  	return x.Xor(x.Equal(x).ToInt32x16())
   492  }
   493  
   494  // Neg returns the element-wise negation of x.
   495  //
   496  // Emulated, CPU Feature: AVX512
   497  func (x Int32x16) Neg() Int32x16 {
   498  	var zero Int32x16
   499  	return zero.Sub(x)
   500  }
   501  
   502  // Not returns the bitwise complement of x.
   503  //
   504  // Emulated, CPU Feature: AVX512
   505  func (x Int64x8) Not() Int64x8 {
   506  	return x.Xor(x.Equal(x).ToInt64x8())
   507  }
   508  
   509  // Neg returns the element-wise negation of x.
   510  //
   511  // Emulated, CPU Feature: AVX512
   512  func (x Int64x8) Neg() Int64x8 {
   513  	var zero Int64x8
   514  	return zero.Sub(x)
   515  }
   516  
   517  // Not returns the bitwise complement of x.
   518  //
   519  // Emulated, CPU Feature: AVX
   520  func (x Uint8x16) Not() Uint8x16 {
   521  	return x.Xor(x.Equal(x).ToInt8x16().AsUint8x16())
   522  }
   523  
   524  // Not returns the bitwise complement of x.
   525  //
   526  // Emulated, CPU Feature: AVX
   527  func (x Uint16x8) Not() Uint16x8 {
   528  	return x.Xor(x.Equal(x).ToInt16x8().AsUint16x8())
   529  }
   530  
   531  // Not returns the bitwise complement of x.
   532  //
   533  // Emulated, CPU Feature: AVX
   534  func (x Uint32x4) Not() Uint32x4 {
   535  	return x.Xor(x.Equal(x).ToInt32x4().AsUint32x4())
   536  }
   537  
   538  // Not returns the bitwise complement of x.
   539  //
   540  // Emulated, CPU Feature: AVX
   541  func (x Uint64x2) Not() Uint64x2 {
   542  	return x.Xor(x.Equal(x).ToInt64x2().AsUint64x2())
   543  }
   544  
   545  // Not returns the bitwise complement of x.
   546  //
   547  // Emulated, CPU Feature: AVX2
   548  func (x Uint8x32) Not() Uint8x32 {
   549  	return x.Xor(x.Equal(x).ToInt8x32().AsUint8x32())
   550  }
   551  
   552  // Not returns the bitwise complement of x.
   553  //
   554  // Emulated, CPU Feature: AVX2
   555  func (x Uint16x16) Not() Uint16x16 {
   556  	return x.Xor(x.Equal(x).ToInt16x16().AsUint16x16())
   557  }
   558  
   559  // Not returns the bitwise complement of x.
   560  //
   561  // Emulated, CPU Feature: AVX2
   562  func (x Uint32x8) Not() Uint32x8 {
   563  	return x.Xor(x.Equal(x).ToInt32x8().AsUint32x8())
   564  }
   565  
   566  // Not returns the bitwise complement of x.
   567  //
   568  // Emulated, CPU Feature: AVX2
   569  func (x Uint64x4) Not() Uint64x4 {
   570  	return x.Xor(x.Equal(x).ToInt64x4().AsUint64x4())
   571  }
   572  
   573  // Not returns the bitwise complement of x.
   574  //
   575  // Emulated, CPU Feature: AVX512
   576  func (x Uint8x64) Not() Uint8x64 {
   577  	return x.Xor(x.Equal(x).ToInt8x64().AsUint8x64())
   578  }
   579  
   580  // Not returns the bitwise complement of x.
   581  //
   582  // Emulated, CPU Feature: AVX512
   583  func (x Uint16x32) Not() Uint16x32 {
   584  	return x.Xor(x.Equal(x).ToInt16x32().AsUint16x32())
   585  }
   586  
   587  // Not returns the bitwise complement of x.
   588  //
   589  // Emulated, CPU Feature: AVX512
   590  func (x Uint32x16) Not() Uint32x16 {
   591  	return x.Xor(x.Equal(x).ToInt32x16().AsUint32x16())
   592  }
   593  
   594  // Not returns the bitwise complement of x.
   595  //
   596  // Emulated, CPU Feature: AVX512
   597  func (x Uint64x8) Not() Uint64x8 {
   598  	return x.Xor(x.Equal(x).ToInt64x8().AsUint64x8())
   599  }
   600  
   601  // String returns a string representation of SIMD vector x.
   602  func (x Int8x16) String() string {
   603  	var s [16]int8
   604  	x.StoreArray(&s)
   605  	return sliceToString(s[:])
   606  }
   607  
   608  // String returns a string representation of SIMD vector x.
   609  func (x Int16x8) String() string {
   610  	var s [8]int16
   611  	x.StoreArray(&s)
   612  	return sliceToString(s[:])
   613  }
   614  
   615  // String returns a string representation of SIMD vector x.
   616  func (x Int32x4) String() string {
   617  	var s [4]int32
   618  	x.StoreArray(&s)
   619  	return sliceToString(s[:])
   620  }
   621  
   622  // String returns a string representation of SIMD vector x.
   623  func (x Int64x2) String() string {
   624  	var s [2]int64
   625  	x.StoreArray(&s)
   626  	return sliceToString(s[:])
   627  }
   628  
   629  // String returns a string representation of SIMD vector x.
   630  func (x Uint8x16) String() string {
   631  	var s [16]uint8
   632  	x.StoreArray(&s)
   633  	return sliceToString(s[:])
   634  }
   635  
   636  // String returns a string representation of SIMD vector x.
   637  func (x Uint16x8) String() string {
   638  	var s [8]uint16
   639  	x.StoreArray(&s)
   640  	return sliceToString(s[:])
   641  }
   642  
   643  // String returns a string representation of SIMD vector x.
   644  func (x Uint32x4) String() string {
   645  	var s [4]uint32
   646  	x.StoreArray(&s)
   647  	return sliceToString(s[:])
   648  }
   649  
   650  // String returns a string representation of SIMD vector x.
   651  func (x Uint64x2) String() string {
   652  	var s [2]uint64
   653  	x.StoreArray(&s)
   654  	return sliceToString(s[:])
   655  }
   656  
   657  // String returns a string representation of SIMD vector x.
   658  func (x Float32x4) String() string {
   659  	var s [4]float32
   660  	x.StoreArray(&s)
   661  	return sliceToString(s[:])
   662  }
   663  
   664  // String returns a string representation of SIMD vector x.
   665  func (x Float64x2) String() string {
   666  	var s [2]float64
   667  	x.StoreArray(&s)
   668  	return sliceToString(s[:])
   669  }
   670  
   671  // String returns a string representation of SIMD vector x.
   672  func (x Int8x32) String() string {
   673  	var s [32]int8
   674  	x.StoreArray(&s)
   675  	return sliceToString(s[:])
   676  }
   677  
   678  // String returns a string representation of SIMD vector x.
   679  func (x Int16x16) String() string {
   680  	var s [16]int16
   681  	x.StoreArray(&s)
   682  	return sliceToString(s[:])
   683  }
   684  
   685  // String returns a string representation of SIMD vector x.
   686  func (x Int32x8) String() string {
   687  	var s [8]int32
   688  	x.StoreArray(&s)
   689  	return sliceToString(s[:])
   690  }
   691  
   692  // String returns a string representation of SIMD vector x.
   693  func (x Int64x4) String() string {
   694  	var s [4]int64
   695  	x.StoreArray(&s)
   696  	return sliceToString(s[:])
   697  }
   698  
   699  // String returns a string representation of SIMD vector x.
   700  func (x Uint8x32) String() string {
   701  	var s [32]uint8
   702  	x.StoreArray(&s)
   703  	return sliceToString(s[:])
   704  }
   705  
   706  // String returns a string representation of SIMD vector x.
   707  func (x Uint16x16) String() string {
   708  	var s [16]uint16
   709  	x.StoreArray(&s)
   710  	return sliceToString(s[:])
   711  }
   712  
   713  // String returns a string representation of SIMD vector x.
   714  func (x Uint32x8) String() string {
   715  	var s [8]uint32
   716  	x.StoreArray(&s)
   717  	return sliceToString(s[:])
   718  }
   719  
   720  // String returns a string representation of SIMD vector x.
   721  func (x Uint64x4) String() string {
   722  	var s [4]uint64
   723  	x.StoreArray(&s)
   724  	return sliceToString(s[:])
   725  }
   726  
   727  // String returns a string representation of SIMD vector x.
   728  func (x Float32x8) String() string {
   729  	var s [8]float32
   730  	x.StoreArray(&s)
   731  	return sliceToString(s[:])
   732  }
   733  
   734  // String returns a string representation of SIMD vector x.
   735  func (x Float64x4) String() string {
   736  	var s [4]float64
   737  	x.StoreArray(&s)
   738  	return sliceToString(s[:])
   739  }
   740  
   741  // String returns a string representation of SIMD vector x.
   742  func (x Int8x64) String() string {
   743  	var s [64]int8
   744  	x.StoreArray(&s)
   745  	return sliceToString(s[:])
   746  }
   747  
   748  // String returns a string representation of SIMD vector x.
   749  func (x Int16x32) String() string {
   750  	var s [32]int16
   751  	x.StoreArray(&s)
   752  	return sliceToString(s[:])
   753  }
   754  
   755  // String returns a string representation of SIMD vector x.
   756  func (x Int32x16) String() string {
   757  	var s [16]int32
   758  	x.StoreArray(&s)
   759  	return sliceToString(s[:])
   760  }
   761  
   762  // String returns a string representation of SIMD vector x.
   763  func (x Int64x8) String() string {
   764  	var s [8]int64
   765  	x.StoreArray(&s)
   766  	return sliceToString(s[:])
   767  }
   768  
   769  // String returns a string representation of SIMD vector x.
   770  func (x Uint8x64) String() string {
   771  	var s [64]uint8
   772  	x.StoreArray(&s)
   773  	return sliceToString(s[:])
   774  }
   775  
   776  // String returns a string representation of SIMD vector x.
   777  func (x Uint16x32) String() string {
   778  	var s [32]uint16
   779  	x.StoreArray(&s)
   780  	return sliceToString(s[:])
   781  }
   782  
   783  // String returns a string representation of SIMD vector x.
   784  func (x Uint32x16) String() string {
   785  	var s [16]uint32
   786  	x.StoreArray(&s)
   787  	return sliceToString(s[:])
   788  }
   789  
   790  // String returns a string representation of SIMD vector x.
   791  func (x Uint64x8) String() string {
   792  	var s [8]uint64
   793  	x.StoreArray(&s)
   794  	return sliceToString(s[:])
   795  }
   796  
   797  // String returns a string representation of SIMD vector x.
   798  func (x Float32x16) String() string {
   799  	var s [16]float32
   800  	x.StoreArray(&s)
   801  	return sliceToString(s[:])
   802  }
   803  
   804  // String returns a string representation of SIMD vector x.
   805  func (x Float64x8) String() string {
   806  	var s [8]float64
   807  	x.StoreArray(&s)
   808  	return sliceToString(s[:])
   809  }
   810  
   811  // String returns a string representation of SIMD mask x.
   812  func (x Mask8x16) String() string {
   813  	var s [16]int8
   814  	x.ToInt8x16().Neg().StoreArray(&s)
   815  	return sliceToString(s[:])
   816  }
   817  
   818  // String returns a string representation of SIMD mask x.
   819  func (x Mask16x8) String() string {
   820  	var s [8]int16
   821  	x.ToInt16x8().Neg().StoreArray(&s)
   822  	return sliceToString(s[:])
   823  }
   824  
   825  // String returns a string representation of SIMD mask x.
   826  func (x Mask32x4) String() string {
   827  	var s [4]int32
   828  	x.ToInt32x4().Neg().StoreArray(&s)
   829  	return sliceToString(s[:])
   830  }
   831  
   832  // String returns a string representation of SIMD mask x.
   833  func (x Mask64x2) String() string {
   834  	var s [2]int64
   835  	x.ToInt64x2().Neg().StoreArray(&s)
   836  	return sliceToString(s[:])
   837  }
   838  
   839  // String returns a string representation of SIMD mask x.
   840  func (x Mask8x32) String() string {
   841  	var s [32]int8
   842  	x.ToInt8x32().Neg().StoreArray(&s)
   843  	return sliceToString(s[:])
   844  }
   845  
   846  // String returns a string representation of SIMD mask x.
   847  func (x Mask16x16) String() string {
   848  	var s [16]int16
   849  	x.ToInt16x16().Neg().StoreArray(&s)
   850  	return sliceToString(s[:])
   851  }
   852  
   853  // String returns a string representation of SIMD mask x.
   854  func (x Mask32x8) String() string {
   855  	var s [8]int32
   856  	x.ToInt32x8().Neg().StoreArray(&s)
   857  	return sliceToString(s[:])
   858  }
   859  
   860  // String returns a string representation of SIMD mask x.
   861  func (x Mask64x4) String() string {
   862  	var s [4]int64
   863  	x.ToInt64x4().Neg().StoreArray(&s)
   864  	return sliceToString(s[:])
   865  }
   866  
   867  // String returns a string representation of SIMD mask x.
   868  func (x Mask8x64) String() string {
   869  	var s [64]int8
   870  	x.ToInt8x64().Neg().StoreArray(&s)
   871  	return sliceToString(s[:])
   872  }
   873  
   874  // String returns a string representation of SIMD mask x.
   875  func (x Mask16x32) String() string {
   876  	var s [32]int16
   877  	x.ToInt16x32().Neg().StoreArray(&s)
   878  	return sliceToString(s[:])
   879  }
   880  
   881  // String returns a string representation of SIMD mask x.
   882  func (x Mask32x16) String() string {
   883  	var s [16]int32
   884  	x.ToInt32x16().Neg().StoreArray(&s)
   885  	return sliceToString(s[:])
   886  }
   887  
   888  // String returns a string representation of SIMD mask x.
   889  func (x Mask64x8) String() string {
   890  	var s [8]int64
   891  	x.ToInt64x8().Neg().StoreArray(&s)
   892  	return sliceToString(s[:])
   893  }
   894  
   895  // RotateAllLeft rotates all elements left by the specified amount
   896  //
   897  // Emulated
   898  func (x Int16x8) RotateAllLeft(dist uint64) Int16x8 {
   899  	dist = dist & (16 - 1)
   900  	ndist := 16 - dist
   901  	return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt16()
   902  }
   903  
   904  // RotateAllRight rotates all elements right by the specified amount
   905  //
   906  // Emulated
   907  func (x Int16x8) RotateAllRight(dist uint64) Int16x8 {
   908  	dist = dist & (16 - 1)
   909  	ndist := 16 - dist
   910  	return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt16()
   911  }
   912  
   913  // RotateAllLeft rotates all elements left by the specified amount
   914  //
   915  // Emulated
   916  func (x Int32x4) RotateAllLeft(dist uint64) Int32x4 {
   917  	dist = dist & (32 - 1)
   918  	ndist := 32 - dist
   919  	return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt32()
   920  }
   921  
   922  // RotateAllRight rotates all elements right by the specified amount
   923  //
   924  // Emulated
   925  func (x Int32x4) RotateAllRight(dist uint64) Int32x4 {
   926  	dist = dist & (32 - 1)
   927  	ndist := 32 - dist
   928  	return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt32()
   929  }
   930  
   931  // RotateAllLeft rotates all elements left by the specified amount
   932  //
   933  // Emulated
   934  func (x Int64x2) RotateAllLeft(dist uint64) Int64x2 {
   935  	dist = dist & (64 - 1)
   936  	ndist := 64 - dist
   937  	return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt64()
   938  }
   939  
   940  // RotateAllRight rotates all elements right by the specified amount
   941  //
   942  // Emulated
   943  func (x Int64x2) RotateAllRight(dist uint64) Int64x2 {
   944  	dist = dist & (64 - 1)
   945  	ndist := 64 - dist
   946  	return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt64()
   947  }
   948  
   949  // RotateAllLeft rotates all elements left by the specified amount
   950  //
   951  // Emulated
   952  func (x Int16x16) RotateAllLeft(dist uint64) Int16x16 {
   953  	dist = dist & (16 - 1)
   954  	ndist := 16 - dist
   955  	return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt16()
   956  }
   957  
   958  // RotateAllRight rotates all elements right by the specified amount
   959  //
   960  // Emulated
   961  func (x Int16x16) RotateAllRight(dist uint64) Int16x16 {
   962  	dist = dist & (16 - 1)
   963  	ndist := 16 - dist
   964  	return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt16()
   965  }
   966  
   967  // RotateAllLeft rotates all elements left by the specified amount
   968  //
   969  // Emulated
   970  func (x Int32x8) RotateAllLeft(dist uint64) Int32x8 {
   971  	dist = dist & (32 - 1)
   972  	ndist := 32 - dist
   973  	return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt32()
   974  }
   975  
   976  // RotateAllRight rotates all elements right by the specified amount
   977  //
   978  // Emulated
   979  func (x Int32x8) RotateAllRight(dist uint64) Int32x8 {
   980  	dist = dist & (32 - 1)
   981  	ndist := 32 - dist
   982  	return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt32()
   983  }
   984  
   985  // RotateAllLeft rotates all elements left by the specified amount
   986  //
   987  // Emulated
   988  func (x Int64x4) RotateAllLeft(dist uint64) Int64x4 {
   989  	dist = dist & (64 - 1)
   990  	ndist := 64 - dist
   991  	return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt64()
   992  }
   993  
   994  // RotateAllRight rotates all elements right by the specified amount
   995  //
   996  // Emulated
   997  func (x Int64x4) RotateAllRight(dist uint64) Int64x4 {
   998  	dist = dist & (64 - 1)
   999  	ndist := 64 - dist
  1000  	return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt64()
  1001  }
  1002  
  1003  // RotateAllLeft rotates all elements left by the specified amount
  1004  //
  1005  // Emulated
  1006  func (x Int16x32) RotateAllLeft(dist uint64) Int16x32 {
  1007  	dist = dist & (16 - 1)
  1008  	ndist := 16 - dist
  1009  	return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt16()
  1010  }
  1011  
  1012  // RotateAllRight rotates all elements right by the specified amount
  1013  //
  1014  // Emulated
  1015  func (x Int16x32) RotateAllRight(dist uint64) Int16x32 {
  1016  	dist = dist & (16 - 1)
  1017  	ndist := 16 - dist
  1018  	return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt16()
  1019  }
  1020  
  1021  // RotateAllLeft rotates all elements left by the specified amount
  1022  //
  1023  // Emulated
  1024  func (x Int32x16) RotateAllLeft(dist uint64) Int32x16 {
  1025  	dist = dist & (32 - 1)
  1026  	ndist := 32 - dist
  1027  	return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt32()
  1028  }
  1029  
  1030  // RotateAllRight rotates all elements right by the specified amount
  1031  //
  1032  // Emulated
  1033  func (x Int32x16) RotateAllRight(dist uint64) Int32x16 {
  1034  	dist = dist & (32 - 1)
  1035  	ndist := 32 - dist
  1036  	return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt32()
  1037  }
  1038  
  1039  // RotateAllLeft rotates all elements left by the specified amount
  1040  //
  1041  // Emulated
  1042  func (x Int64x8) RotateAllLeft(dist uint64) Int64x8 {
  1043  	dist = dist & (64 - 1)
  1044  	ndist := 64 - dist
  1045  	return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt64()
  1046  }
  1047  
  1048  // RotateAllRight rotates all elements right by the specified amount
  1049  //
  1050  // Emulated
  1051  func (x Int64x8) RotateAllRight(dist uint64) Int64x8 {
  1052  	dist = dist & (64 - 1)
  1053  	ndist := 64 - dist
  1054  	return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt64()
  1055  }
  1056  
  1057  // RotateAllLeft rotates all elements left by the specified amount
  1058  //
  1059  // Emulated
  1060  func (x Uint16x8) RotateAllLeft(dist uint64) Uint16x8 {
  1061  	dist = dist & (16 - 1)
  1062  	ndist := 16 - dist
  1063  	return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
  1064  }
  1065  
  1066  // RotateAllRight rotates all elements right by the specified amount
  1067  //
  1068  // Emulated
  1069  func (x Uint16x8) RotateAllRight(dist uint64) Uint16x8 {
  1070  	dist = dist & (16 - 1)
  1071  	ndist := 16 - dist
  1072  	return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
  1073  }
  1074  
  1075  // RotateAllLeft rotates all elements left by the specified amount
  1076  //
  1077  // Emulated
  1078  func (x Uint32x4) RotateAllLeft(dist uint64) Uint32x4 {
  1079  	dist = dist & (32 - 1)
  1080  	ndist := 32 - dist
  1081  	return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
  1082  }
  1083  
  1084  // RotateAllRight rotates all elements right by the specified amount
  1085  //
  1086  // Emulated
  1087  func (x Uint32x4) RotateAllRight(dist uint64) Uint32x4 {
  1088  	dist = dist & (32 - 1)
  1089  	ndist := 32 - dist
  1090  	return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
  1091  }
  1092  
  1093  // RotateAllLeft rotates all elements left by the specified amount
  1094  //
  1095  // Emulated
  1096  func (x Uint64x2) RotateAllLeft(dist uint64) Uint64x2 {
  1097  	dist = dist & (64 - 1)
  1098  	ndist := 64 - dist
  1099  	return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
  1100  }
  1101  
  1102  // RotateAllRight rotates all elements right by the specified amount
  1103  //
  1104  // Emulated
  1105  func (x Uint64x2) RotateAllRight(dist uint64) Uint64x2 {
  1106  	dist = dist & (64 - 1)
  1107  	ndist := 64 - dist
  1108  	return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
  1109  }
  1110  
  1111  // RotateAllLeft rotates all elements left by the specified amount
  1112  //
  1113  // Emulated
  1114  func (x Uint16x16) RotateAllLeft(dist uint64) Uint16x16 {
  1115  	dist = dist & (16 - 1)
  1116  	ndist := 16 - dist
  1117  	return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
  1118  }
  1119  
  1120  // RotateAllRight rotates all elements right by the specified amount
  1121  //
  1122  // Emulated
  1123  func (x Uint16x16) RotateAllRight(dist uint64) Uint16x16 {
  1124  	dist = dist & (16 - 1)
  1125  	ndist := 16 - dist
  1126  	return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
  1127  }
  1128  
  1129  // RotateAllLeft rotates all elements left by the specified amount
  1130  //
  1131  // Emulated
  1132  func (x Uint32x8) RotateAllLeft(dist uint64) Uint32x8 {
  1133  	dist = dist & (32 - 1)
  1134  	ndist := 32 - dist
  1135  	return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
  1136  }
  1137  
  1138  // RotateAllRight rotates all elements right by the specified amount
  1139  //
  1140  // Emulated
  1141  func (x Uint32x8) RotateAllRight(dist uint64) Uint32x8 {
  1142  	dist = dist & (32 - 1)
  1143  	ndist := 32 - dist
  1144  	return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
  1145  }
  1146  
  1147  // RotateAllLeft rotates all elements left by the specified amount
  1148  //
  1149  // Emulated
  1150  func (x Uint64x4) RotateAllLeft(dist uint64) Uint64x4 {
  1151  	dist = dist & (64 - 1)
  1152  	ndist := 64 - dist
  1153  	return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
  1154  }
  1155  
  1156  // RotateAllRight rotates all elements right by the specified amount
  1157  //
  1158  // Emulated
  1159  func (x Uint64x4) RotateAllRight(dist uint64) Uint64x4 {
  1160  	dist = dist & (64 - 1)
  1161  	ndist := 64 - dist
  1162  	return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
  1163  }
  1164  
  1165  // RotateAllLeft rotates all elements left by the specified amount
  1166  //
  1167  // Emulated
  1168  func (x Uint16x32) RotateAllLeft(dist uint64) Uint16x32 {
  1169  	dist = dist & (16 - 1)
  1170  	ndist := 16 - dist
  1171  	return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
  1172  }
  1173  
  1174  // RotateAllRight rotates all elements right by the specified amount
  1175  //
  1176  // Emulated
  1177  func (x Uint16x32) RotateAllRight(dist uint64) Uint16x32 {
  1178  	dist = dist & (16 - 1)
  1179  	ndist := 16 - dist
  1180  	return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
  1181  }
  1182  
  1183  // RotateAllLeft rotates all elements left by the specified amount
  1184  //
  1185  // Emulated
  1186  func (x Uint32x16) RotateAllLeft(dist uint64) Uint32x16 {
  1187  	dist = dist & (32 - 1)
  1188  	ndist := 32 - dist
  1189  	return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
  1190  }
  1191  
  1192  // RotateAllRight rotates all elements right by the specified amount
  1193  //
  1194  // Emulated
  1195  func (x Uint32x16) RotateAllRight(dist uint64) Uint32x16 {
  1196  	dist = dist & (32 - 1)
  1197  	ndist := 32 - dist
  1198  	return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
  1199  }
  1200  
  1201  // RotateAllLeft rotates all elements left by the specified amount
  1202  //
  1203  // Emulated
  1204  func (x Uint64x8) RotateAllLeft(dist uint64) Uint64x8 {
  1205  	dist = dist & (64 - 1)
  1206  	ndist := 64 - dist
  1207  	return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
  1208  }
  1209  
  1210  // RotateAllRight rotates all elements right by the specified amount
  1211  //
  1212  // Emulated
  1213  func (x Uint64x8) RotateAllRight(dist uint64) Uint64x8 {
  1214  	dist = dist & (64 - 1)
  1215  	ndist := 64 - dist
  1216  	return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
  1217  }
  1218  

View as plain text