Source file src/simd/compare_gen_amd64.go

     1  // Code generated by 'go run genfiles.go'; DO NOT EDIT.
     2  
     3  //go:build goexperiment.simd
     4  
     5  package simd
     6  
     7  // Less returns a mask whose elements indicate whether x < y
     8  //
     9  // Emulated, CPU Feature AVX
    10  func (x Int8x16) Less(y Int8x16) Mask8x16 {
    11  	return y.Greater(x)
    12  }
    13  
    14  // GreaterEqual returns a mask whose elements indicate whether x >= y
    15  //
    16  // Emulated, CPU Feature AVX
    17  func (x Int8x16) GreaterEqual(y Int8x16) Mask8x16 {
    18  	ones := x.Equal(x).AsInt8x16()
    19  	return y.Greater(x).AsInt8x16().Xor(ones).asMask()
    20  }
    21  
    22  // LessEqual returns a mask whose elements indicate whether x <= y
    23  //
    24  // Emulated, CPU Feature AVX
    25  func (x Int8x16) LessEqual(y Int8x16) Mask8x16 {
    26  	ones := x.Equal(x).AsInt8x16()
    27  	return x.Greater(y).AsInt8x16().Xor(ones).asMask()
    28  }
    29  
    30  // NotEqual returns a mask whose elements indicate whether x != y
    31  //
    32  // Emulated, CPU Feature AVX
    33  func (x Int8x16) NotEqual(y Int8x16) Mask8x16 {
    34  	ones := x.Equal(x).AsInt8x16()
    35  	return x.Equal(y).AsInt8x16().Xor(ones).asMask()
    36  }
    37  
    38  // Less returns a mask whose elements indicate whether x < y
    39  //
    40  // Emulated, CPU Feature AVX
    41  func (x Int16x8) Less(y Int16x8) Mask16x8 {
    42  	return y.Greater(x)
    43  }
    44  
    45  // GreaterEqual returns a mask whose elements indicate whether x >= y
    46  //
    47  // Emulated, CPU Feature AVX
    48  func (x Int16x8) GreaterEqual(y Int16x8) Mask16x8 {
    49  	ones := x.Equal(x).AsInt16x8()
    50  	return y.Greater(x).AsInt16x8().Xor(ones).asMask()
    51  }
    52  
    53  // LessEqual returns a mask whose elements indicate whether x <= y
    54  //
    55  // Emulated, CPU Feature AVX
    56  func (x Int16x8) LessEqual(y Int16x8) Mask16x8 {
    57  	ones := x.Equal(x).AsInt16x8()
    58  	return x.Greater(y).AsInt16x8().Xor(ones).asMask()
    59  }
    60  
    61  // NotEqual returns a mask whose elements indicate whether x != y
    62  //
    63  // Emulated, CPU Feature AVX
    64  func (x Int16x8) NotEqual(y Int16x8) Mask16x8 {
    65  	ones := x.Equal(x).AsInt16x8()
    66  	return x.Equal(y).AsInt16x8().Xor(ones).asMask()
    67  }
    68  
    69  // Less returns a mask whose elements indicate whether x < y
    70  //
    71  // Emulated, CPU Feature AVX
    72  func (x Int32x4) Less(y Int32x4) Mask32x4 {
    73  	return y.Greater(x)
    74  }
    75  
    76  // GreaterEqual returns a mask whose elements indicate whether x >= y
    77  //
    78  // Emulated, CPU Feature AVX
    79  func (x Int32x4) GreaterEqual(y Int32x4) Mask32x4 {
    80  	ones := x.Equal(x).AsInt32x4()
    81  	return y.Greater(x).AsInt32x4().Xor(ones).asMask()
    82  }
    83  
    84  // LessEqual returns a mask whose elements indicate whether x <= y
    85  //
    86  // Emulated, CPU Feature AVX
    87  func (x Int32x4) LessEqual(y Int32x4) Mask32x4 {
    88  	ones := x.Equal(x).AsInt32x4()
    89  	return x.Greater(y).AsInt32x4().Xor(ones).asMask()
    90  }
    91  
    92  // NotEqual returns a mask whose elements indicate whether x != y
    93  //
    94  // Emulated, CPU Feature AVX
    95  func (x Int32x4) NotEqual(y Int32x4) Mask32x4 {
    96  	ones := x.Equal(x).AsInt32x4()
    97  	return x.Equal(y).AsInt32x4().Xor(ones).asMask()
    98  }
    99  
   100  // Less returns a mask whose elements indicate whether x < y
   101  //
   102  // Emulated, CPU Feature AVX
   103  func (x Int64x2) Less(y Int64x2) Mask64x2 {
   104  	return y.Greater(x)
   105  }
   106  
   107  // GreaterEqual returns a mask whose elements indicate whether x >= y
   108  //
   109  // Emulated, CPU Feature AVX
   110  func (x Int64x2) GreaterEqual(y Int64x2) Mask64x2 {
   111  	ones := x.Equal(x).AsInt64x2()
   112  	return y.Greater(x).AsInt64x2().Xor(ones).asMask()
   113  }
   114  
   115  // LessEqual returns a mask whose elements indicate whether x <= y
   116  //
   117  // Emulated, CPU Feature AVX
   118  func (x Int64x2) LessEqual(y Int64x2) Mask64x2 {
   119  	ones := x.Equal(x).AsInt64x2()
   120  	return x.Greater(y).AsInt64x2().Xor(ones).asMask()
   121  }
   122  
   123  // NotEqual returns a mask whose elements indicate whether x != y
   124  //
   125  // Emulated, CPU Feature AVX
   126  func (x Int64x2) NotEqual(y Int64x2) Mask64x2 {
   127  	ones := x.Equal(x).AsInt64x2()
   128  	return x.Equal(y).AsInt64x2().Xor(ones).asMask()
   129  }
   130  
   131  // Less returns a mask whose elements indicate whether x < y
   132  //
   133  // Emulated, CPU Feature AVX2
   134  func (x Int8x32) Less(y Int8x32) Mask8x32 {
   135  	return y.Greater(x)
   136  }
   137  
   138  // GreaterEqual returns a mask whose elements indicate whether x >= y
   139  //
   140  // Emulated, CPU Feature AVX2
   141  func (x Int8x32) GreaterEqual(y Int8x32) Mask8x32 {
   142  	ones := x.Equal(x).AsInt8x32()
   143  	return y.Greater(x).AsInt8x32().Xor(ones).asMask()
   144  }
   145  
   146  // LessEqual returns a mask whose elements indicate whether x <= y
   147  //
   148  // Emulated, CPU Feature AVX2
   149  func (x Int8x32) LessEqual(y Int8x32) Mask8x32 {
   150  	ones := x.Equal(x).AsInt8x32()
   151  	return x.Greater(y).AsInt8x32().Xor(ones).asMask()
   152  }
   153  
   154  // NotEqual returns a mask whose elements indicate whether x != y
   155  //
   156  // Emulated, CPU Feature AVX2
   157  func (x Int8x32) NotEqual(y Int8x32) Mask8x32 {
   158  	ones := x.Equal(x).AsInt8x32()
   159  	return x.Equal(y).AsInt8x32().Xor(ones).asMask()
   160  }
   161  
   162  // Less returns a mask whose elements indicate whether x < y
   163  //
   164  // Emulated, CPU Feature AVX2
   165  func (x Int16x16) Less(y Int16x16) Mask16x16 {
   166  	return y.Greater(x)
   167  }
   168  
   169  // GreaterEqual returns a mask whose elements indicate whether x >= y
   170  //
   171  // Emulated, CPU Feature AVX2
   172  func (x Int16x16) GreaterEqual(y Int16x16) Mask16x16 {
   173  	ones := x.Equal(x).AsInt16x16()
   174  	return y.Greater(x).AsInt16x16().Xor(ones).asMask()
   175  }
   176  
   177  // LessEqual returns a mask whose elements indicate whether x <= y
   178  //
   179  // Emulated, CPU Feature AVX2
   180  func (x Int16x16) LessEqual(y Int16x16) Mask16x16 {
   181  	ones := x.Equal(x).AsInt16x16()
   182  	return x.Greater(y).AsInt16x16().Xor(ones).asMask()
   183  }
   184  
   185  // NotEqual returns a mask whose elements indicate whether x != y
   186  //
   187  // Emulated, CPU Feature AVX2
   188  func (x Int16x16) NotEqual(y Int16x16) Mask16x16 {
   189  	ones := x.Equal(x).AsInt16x16()
   190  	return x.Equal(y).AsInt16x16().Xor(ones).asMask()
   191  }
   192  
   193  // Less returns a mask whose elements indicate whether x < y
   194  //
   195  // Emulated, CPU Feature AVX2
   196  func (x Int32x8) Less(y Int32x8) Mask32x8 {
   197  	return y.Greater(x)
   198  }
   199  
   200  // GreaterEqual returns a mask whose elements indicate whether x >= y
   201  //
   202  // Emulated, CPU Feature AVX2
   203  func (x Int32x8) GreaterEqual(y Int32x8) Mask32x8 {
   204  	ones := x.Equal(x).AsInt32x8()
   205  	return y.Greater(x).AsInt32x8().Xor(ones).asMask()
   206  }
   207  
   208  // LessEqual returns a mask whose elements indicate whether x <= y
   209  //
   210  // Emulated, CPU Feature AVX2
   211  func (x Int32x8) LessEqual(y Int32x8) Mask32x8 {
   212  	ones := x.Equal(x).AsInt32x8()
   213  	return x.Greater(y).AsInt32x8().Xor(ones).asMask()
   214  }
   215  
   216  // NotEqual returns a mask whose elements indicate whether x != y
   217  //
   218  // Emulated, CPU Feature AVX2
   219  func (x Int32x8) NotEqual(y Int32x8) Mask32x8 {
   220  	ones := x.Equal(x).AsInt32x8()
   221  	return x.Equal(y).AsInt32x8().Xor(ones).asMask()
   222  }
   223  
   224  // Less returns a mask whose elements indicate whether x < y
   225  //
   226  // Emulated, CPU Feature AVX2
   227  func (x Int64x4) Less(y Int64x4) Mask64x4 {
   228  	return y.Greater(x)
   229  }
   230  
   231  // GreaterEqual returns a mask whose elements indicate whether x >= y
   232  //
   233  // Emulated, CPU Feature AVX2
   234  func (x Int64x4) GreaterEqual(y Int64x4) Mask64x4 {
   235  	ones := x.Equal(x).AsInt64x4()
   236  	return y.Greater(x).AsInt64x4().Xor(ones).asMask()
   237  }
   238  
   239  // LessEqual returns a mask whose elements indicate whether x <= y
   240  //
   241  // Emulated, CPU Feature AVX2
   242  func (x Int64x4) LessEqual(y Int64x4) Mask64x4 {
   243  	ones := x.Equal(x).AsInt64x4()
   244  	return x.Greater(y).AsInt64x4().Xor(ones).asMask()
   245  }
   246  
   247  // NotEqual returns a mask whose elements indicate whether x != y
   248  //
   249  // Emulated, CPU Feature AVX2
   250  func (x Int64x4) NotEqual(y Int64x4) Mask64x4 {
   251  	ones := x.Equal(x).AsInt64x4()
   252  	return x.Equal(y).AsInt64x4().Xor(ones).asMask()
   253  }
   254  
   255  // Greater returns a mask whose elements indicate whether x > y
   256  //
   257  // Emulated, CPU Feature AVX2
   258  func (x Uint8x16) Greater(y Uint8x16) Mask8x16 {
   259  	a, b := x.AsInt8x16(), y.AsInt8x16()
   260  	signs := BroadcastInt8x16(-1 << (8 - 1))
   261  	return a.Xor(signs).Greater(b.Xor(signs))
   262  }
   263  
   264  // Less returns a mask whose elements indicate whether x < y
   265  //
   266  // Emulated, CPU Feature AVX2
   267  func (x Uint8x16) Less(y Uint8x16) Mask8x16 {
   268  	a, b := x.AsInt8x16(), y.AsInt8x16()
   269  	signs := BroadcastInt8x16(-1 << (8 - 1))
   270  	return b.Xor(signs).Greater(a.Xor(signs))
   271  }
   272  
   273  // GreaterEqual returns a mask whose elements indicate whether x >= y
   274  //
   275  // Emulated, CPU Feature AVX2
   276  func (x Uint8x16) GreaterEqual(y Uint8x16) Mask8x16 {
   277  	a, b := x.AsInt8x16(), y.AsInt8x16()
   278  	ones := x.Equal(x).AsInt8x16()
   279  	signs := BroadcastInt8x16(-1 << (8 - 1))
   280  	return b.Xor(signs).Greater(a.Xor(signs)).AsInt8x16().Xor(ones).asMask()
   281  }
   282  
   283  // LessEqual returns a mask whose elements indicate whether x <= y
   284  //
   285  // Emulated, CPU Feature AVX2
   286  func (x Uint8x16) LessEqual(y Uint8x16) Mask8x16 {
   287  	a, b := x.AsInt8x16(), y.AsInt8x16()
   288  	ones := x.Equal(x).AsInt8x16()
   289  	signs := BroadcastInt8x16(-1 << (8 - 1))
   290  	return a.Xor(signs).Greater(b.Xor(signs)).AsInt8x16().Xor(ones).asMask()
   291  }
   292  
   293  // NotEqual returns a mask whose elements indicate whether x != y
   294  //
   295  // Emulated, CPU Feature AVX
   296  func (x Uint8x16) NotEqual(y Uint8x16) Mask8x16 {
   297  	a, b := x.AsInt8x16(), y.AsInt8x16()
   298  	ones := x.Equal(x).AsInt8x16()
   299  	return a.Equal(b).AsInt8x16().Xor(ones).asMask()
   300  }
   301  
   302  // Greater returns a mask whose elements indicate whether x > y
   303  //
   304  // Emulated, CPU Feature AVX
   305  func (x Uint16x8) Greater(y Uint16x8) Mask16x8 {
   306  	a, b := x.AsInt16x8(), y.AsInt16x8()
   307  	ones := x.Equal(x).AsInt16x8()
   308  	signs := ones.ShiftAllLeft(16 - 1)
   309  	return a.Xor(signs).Greater(b.Xor(signs))
   310  }
   311  
   312  // Less returns a mask whose elements indicate whether x < y
   313  //
   314  // Emulated, CPU Feature AVX
   315  func (x Uint16x8) Less(y Uint16x8) Mask16x8 {
   316  	a, b := x.AsInt16x8(), y.AsInt16x8()
   317  	ones := x.Equal(x).AsInt16x8()
   318  	signs := ones.ShiftAllLeft(16 - 1)
   319  	return b.Xor(signs).Greater(a.Xor(signs))
   320  }
   321  
   322  // GreaterEqual returns a mask whose elements indicate whether x >= y
   323  //
   324  // Emulated, CPU Feature AVX
   325  func (x Uint16x8) GreaterEqual(y Uint16x8) Mask16x8 {
   326  	a, b := x.AsInt16x8(), y.AsInt16x8()
   327  	ones := x.Equal(x).AsInt16x8()
   328  	signs := ones.ShiftAllLeft(16 - 1)
   329  	return b.Xor(signs).Greater(a.Xor(signs)).AsInt16x8().Xor(ones).asMask()
   330  }
   331  
   332  // LessEqual returns a mask whose elements indicate whether x <= y
   333  //
   334  // Emulated, CPU Feature AVX
   335  func (x Uint16x8) LessEqual(y Uint16x8) Mask16x8 {
   336  	a, b := x.AsInt16x8(), y.AsInt16x8()
   337  	ones := x.Equal(x).AsInt16x8()
   338  	signs := ones.ShiftAllLeft(16 - 1)
   339  	return a.Xor(signs).Greater(b.Xor(signs)).AsInt16x8().Xor(ones).asMask()
   340  }
   341  
   342  // NotEqual returns a mask whose elements indicate whether x != y
   343  //
   344  // Emulated, CPU Feature AVX
   345  func (x Uint16x8) NotEqual(y Uint16x8) Mask16x8 {
   346  	a, b := x.AsInt16x8(), y.AsInt16x8()
   347  	ones := x.Equal(x).AsInt16x8()
   348  	return a.Equal(b).AsInt16x8().Xor(ones).asMask()
   349  }
   350  
   351  // Greater returns a mask whose elements indicate whether x > y
   352  //
   353  // Emulated, CPU Feature AVX
   354  func (x Uint32x4) Greater(y Uint32x4) Mask32x4 {
   355  	a, b := x.AsInt32x4(), y.AsInt32x4()
   356  	ones := x.Equal(x).AsInt32x4()
   357  	signs := ones.ShiftAllLeft(32 - 1)
   358  	return a.Xor(signs).Greater(b.Xor(signs))
   359  }
   360  
   361  // Less returns a mask whose elements indicate whether x < y
   362  //
   363  // Emulated, CPU Feature AVX
   364  func (x Uint32x4) Less(y Uint32x4) Mask32x4 {
   365  	a, b := x.AsInt32x4(), y.AsInt32x4()
   366  	ones := x.Equal(x).AsInt32x4()
   367  	signs := ones.ShiftAllLeft(32 - 1)
   368  	return b.Xor(signs).Greater(a.Xor(signs))
   369  }
   370  
   371  // GreaterEqual returns a mask whose elements indicate whether x >= y
   372  //
   373  // Emulated, CPU Feature AVX
   374  func (x Uint32x4) GreaterEqual(y Uint32x4) Mask32x4 {
   375  	a, b := x.AsInt32x4(), y.AsInt32x4()
   376  	ones := x.Equal(x).AsInt32x4()
   377  	signs := ones.ShiftAllLeft(32 - 1)
   378  	return b.Xor(signs).Greater(a.Xor(signs)).AsInt32x4().Xor(ones).asMask()
   379  }
   380  
   381  // LessEqual returns a mask whose elements indicate whether x <= y
   382  //
   383  // Emulated, CPU Feature AVX
   384  func (x Uint32x4) LessEqual(y Uint32x4) Mask32x4 {
   385  	a, b := x.AsInt32x4(), y.AsInt32x4()
   386  	ones := x.Equal(x).AsInt32x4()
   387  	signs := ones.ShiftAllLeft(32 - 1)
   388  	return a.Xor(signs).Greater(b.Xor(signs)).AsInt32x4().Xor(ones).asMask()
   389  }
   390  
   391  // NotEqual returns a mask whose elements indicate whether x != y
   392  //
   393  // Emulated, CPU Feature AVX
   394  func (x Uint32x4) NotEqual(y Uint32x4) Mask32x4 {
   395  	a, b := x.AsInt32x4(), y.AsInt32x4()
   396  	ones := x.Equal(x).AsInt32x4()
   397  	return a.Equal(b).AsInt32x4().Xor(ones).asMask()
   398  }
   399  
   400  // Greater returns a mask whose elements indicate whether x > y
   401  //
   402  // Emulated, CPU Feature AVX
   403  func (x Uint64x2) Greater(y Uint64x2) Mask64x2 {
   404  	a, b := x.AsInt64x2(), y.AsInt64x2()
   405  	ones := x.Equal(x).AsInt64x2()
   406  	signs := ones.ShiftAllLeft(64 - 1)
   407  	return a.Xor(signs).Greater(b.Xor(signs))
   408  }
   409  
   410  // Less returns a mask whose elements indicate whether x < y
   411  //
   412  // Emulated, CPU Feature AVX
   413  func (x Uint64x2) Less(y Uint64x2) Mask64x2 {
   414  	a, b := x.AsInt64x2(), y.AsInt64x2()
   415  	ones := x.Equal(x).AsInt64x2()
   416  	signs := ones.ShiftAllLeft(64 - 1)
   417  	return b.Xor(signs).Greater(a.Xor(signs))
   418  }
   419  
   420  // GreaterEqual returns a mask whose elements indicate whether x >= y
   421  //
   422  // Emulated, CPU Feature AVX
   423  func (x Uint64x2) GreaterEqual(y Uint64x2) Mask64x2 {
   424  	a, b := x.AsInt64x2(), y.AsInt64x2()
   425  	ones := x.Equal(x).AsInt64x2()
   426  	signs := ones.ShiftAllLeft(64 - 1)
   427  	return b.Xor(signs).Greater(a.Xor(signs)).AsInt64x2().Xor(ones).asMask()
   428  }
   429  
   430  // LessEqual returns a mask whose elements indicate whether x <= y
   431  //
   432  // Emulated, CPU Feature AVX
   433  func (x Uint64x2) LessEqual(y Uint64x2) Mask64x2 {
   434  	a, b := x.AsInt64x2(), y.AsInt64x2()
   435  	ones := x.Equal(x).AsInt64x2()
   436  	signs := ones.ShiftAllLeft(64 - 1)
   437  	return a.Xor(signs).Greater(b.Xor(signs)).AsInt64x2().Xor(ones).asMask()
   438  }
   439  
   440  // NotEqual returns a mask whose elements indicate whether x != y
   441  //
   442  // Emulated, CPU Feature AVX
   443  func (x Uint64x2) NotEqual(y Uint64x2) Mask64x2 {
   444  	a, b := x.AsInt64x2(), y.AsInt64x2()
   445  	ones := x.Equal(x).AsInt64x2()
   446  	return a.Equal(b).AsInt64x2().Xor(ones).asMask()
   447  }
   448  
   449  // Greater returns a mask whose elements indicate whether x > y
   450  //
   451  // Emulated, CPU Feature AVX2
   452  func (x Uint8x32) Greater(y Uint8x32) Mask8x32 {
   453  	a, b := x.AsInt8x32(), y.AsInt8x32()
   454  	signs := BroadcastInt8x32(-1 << (8 - 1))
   455  	return a.Xor(signs).Greater(b.Xor(signs))
   456  }
   457  
   458  // Less returns a mask whose elements indicate whether x < y
   459  //
   460  // Emulated, CPU Feature AVX2
   461  func (x Uint8x32) Less(y Uint8x32) Mask8x32 {
   462  	a, b := x.AsInt8x32(), y.AsInt8x32()
   463  	signs := BroadcastInt8x32(-1 << (8 - 1))
   464  	return b.Xor(signs).Greater(a.Xor(signs))
   465  }
   466  
   467  // GreaterEqual returns a mask whose elements indicate whether x >= y
   468  //
   469  // Emulated, CPU Feature AVX2
   470  func (x Uint8x32) GreaterEqual(y Uint8x32) Mask8x32 {
   471  	a, b := x.AsInt8x32(), y.AsInt8x32()
   472  	ones := x.Equal(x).AsInt8x32()
   473  	signs := BroadcastInt8x32(-1 << (8 - 1))
   474  	return b.Xor(signs).Greater(a.Xor(signs)).AsInt8x32().Xor(ones).asMask()
   475  }
   476  
   477  // LessEqual returns a mask whose elements indicate whether x <= y
   478  //
   479  // Emulated, CPU Feature AVX2
   480  func (x Uint8x32) LessEqual(y Uint8x32) Mask8x32 {
   481  	a, b := x.AsInt8x32(), y.AsInt8x32()
   482  	ones := x.Equal(x).AsInt8x32()
   483  	signs := BroadcastInt8x32(-1 << (8 - 1))
   484  	return a.Xor(signs).Greater(b.Xor(signs)).AsInt8x32().Xor(ones).asMask()
   485  }
   486  
   487  // NotEqual returns a mask whose elements indicate whether x != y
   488  //
   489  // Emulated, CPU Feature AVX2
   490  func (x Uint8x32) NotEqual(y Uint8x32) Mask8x32 {
   491  	a, b := x.AsInt8x32(), y.AsInt8x32()
   492  	ones := x.Equal(x).AsInt8x32()
   493  	return a.Equal(b).AsInt8x32().Xor(ones).asMask()
   494  }
   495  
   496  // Greater returns a mask whose elements indicate whether x > y
   497  //
   498  // Emulated, CPU Feature AVX2
   499  func (x Uint16x16) Greater(y Uint16x16) Mask16x16 {
   500  	a, b := x.AsInt16x16(), y.AsInt16x16()
   501  	ones := x.Equal(x).AsInt16x16()
   502  	signs := ones.ShiftAllLeft(16 - 1)
   503  	return a.Xor(signs).Greater(b.Xor(signs))
   504  }
   505  
   506  // Less returns a mask whose elements indicate whether x < y
   507  //
   508  // Emulated, CPU Feature AVX2
   509  func (x Uint16x16) Less(y Uint16x16) Mask16x16 {
   510  	a, b := x.AsInt16x16(), y.AsInt16x16()
   511  	ones := x.Equal(x).AsInt16x16()
   512  	signs := ones.ShiftAllLeft(16 - 1)
   513  	return b.Xor(signs).Greater(a.Xor(signs))
   514  }
   515  
   516  // GreaterEqual returns a mask whose elements indicate whether x >= y
   517  //
   518  // Emulated, CPU Feature AVX2
   519  func (x Uint16x16) GreaterEqual(y Uint16x16) Mask16x16 {
   520  	a, b := x.AsInt16x16(), y.AsInt16x16()
   521  	ones := x.Equal(x).AsInt16x16()
   522  	signs := ones.ShiftAllLeft(16 - 1)
   523  	return b.Xor(signs).Greater(a.Xor(signs)).AsInt16x16().Xor(ones).asMask()
   524  }
   525  
   526  // LessEqual returns a mask whose elements indicate whether x <= y
   527  //
   528  // Emulated, CPU Feature AVX2
   529  func (x Uint16x16) LessEqual(y Uint16x16) Mask16x16 {
   530  	a, b := x.AsInt16x16(), y.AsInt16x16()
   531  	ones := x.Equal(x).AsInt16x16()
   532  	signs := ones.ShiftAllLeft(16 - 1)
   533  	return a.Xor(signs).Greater(b.Xor(signs)).AsInt16x16().Xor(ones).asMask()
   534  }
   535  
   536  // NotEqual returns a mask whose elements indicate whether x != y
   537  //
   538  // Emulated, CPU Feature AVX2
   539  func (x Uint16x16) NotEqual(y Uint16x16) Mask16x16 {
   540  	a, b := x.AsInt16x16(), y.AsInt16x16()
   541  	ones := x.Equal(x).AsInt16x16()
   542  	return a.Equal(b).AsInt16x16().Xor(ones).asMask()
   543  }
   544  
   545  // Greater returns a mask whose elements indicate whether x > y
   546  //
   547  // Emulated, CPU Feature AVX2
   548  func (x Uint32x8) Greater(y Uint32x8) Mask32x8 {
   549  	a, b := x.AsInt32x8(), y.AsInt32x8()
   550  	ones := x.Equal(x).AsInt32x8()
   551  	signs := ones.ShiftAllLeft(32 - 1)
   552  	return a.Xor(signs).Greater(b.Xor(signs))
   553  }
   554  
   555  // Less returns a mask whose elements indicate whether x < y
   556  //
   557  // Emulated, CPU Feature AVX2
   558  func (x Uint32x8) Less(y Uint32x8) Mask32x8 {
   559  	a, b := x.AsInt32x8(), y.AsInt32x8()
   560  	ones := x.Equal(x).AsInt32x8()
   561  	signs := ones.ShiftAllLeft(32 - 1)
   562  	return b.Xor(signs).Greater(a.Xor(signs))
   563  }
   564  
   565  // GreaterEqual returns a mask whose elements indicate whether x >= y
   566  //
   567  // Emulated, CPU Feature AVX2
   568  func (x Uint32x8) GreaterEqual(y Uint32x8) Mask32x8 {
   569  	a, b := x.AsInt32x8(), y.AsInt32x8()
   570  	ones := x.Equal(x).AsInt32x8()
   571  	signs := ones.ShiftAllLeft(32 - 1)
   572  	return b.Xor(signs).Greater(a.Xor(signs)).AsInt32x8().Xor(ones).asMask()
   573  }
   574  
   575  // LessEqual returns a mask whose elements indicate whether x <= y
   576  //
   577  // Emulated, CPU Feature AVX2
   578  func (x Uint32x8) LessEqual(y Uint32x8) Mask32x8 {
   579  	a, b := x.AsInt32x8(), y.AsInt32x8()
   580  	ones := x.Equal(x).AsInt32x8()
   581  	signs := ones.ShiftAllLeft(32 - 1)
   582  	return a.Xor(signs).Greater(b.Xor(signs)).AsInt32x8().Xor(ones).asMask()
   583  }
   584  
   585  // NotEqual returns a mask whose elements indicate whether x != y
   586  //
   587  // Emulated, CPU Feature AVX2
   588  func (x Uint32x8) NotEqual(y Uint32x8) Mask32x8 {
   589  	a, b := x.AsInt32x8(), y.AsInt32x8()
   590  	ones := x.Equal(x).AsInt32x8()
   591  	return a.Equal(b).AsInt32x8().Xor(ones).asMask()
   592  }
   593  
   594  // Greater returns a mask whose elements indicate whether x > y
   595  //
   596  // Emulated, CPU Feature AVX2
   597  func (x Uint64x4) Greater(y Uint64x4) Mask64x4 {
   598  	a, b := x.AsInt64x4(), y.AsInt64x4()
   599  	ones := x.Equal(x).AsInt64x4()
   600  	signs := ones.ShiftAllLeft(64 - 1)
   601  	return a.Xor(signs).Greater(b.Xor(signs))
   602  }
   603  
   604  // Less returns a mask whose elements indicate whether x < y
   605  //
   606  // Emulated, CPU Feature AVX2
   607  func (x Uint64x4) Less(y Uint64x4) Mask64x4 {
   608  	a, b := x.AsInt64x4(), y.AsInt64x4()
   609  	ones := x.Equal(x).AsInt64x4()
   610  	signs := ones.ShiftAllLeft(64 - 1)
   611  	return b.Xor(signs).Greater(a.Xor(signs))
   612  }
   613  
   614  // GreaterEqual returns a mask whose elements indicate whether x >= y
   615  //
   616  // Emulated, CPU Feature AVX2
   617  func (x Uint64x4) GreaterEqual(y Uint64x4) Mask64x4 {
   618  	a, b := x.AsInt64x4(), y.AsInt64x4()
   619  	ones := x.Equal(x).AsInt64x4()
   620  	signs := ones.ShiftAllLeft(64 - 1)
   621  	return b.Xor(signs).Greater(a.Xor(signs)).AsInt64x4().Xor(ones).asMask()
   622  }
   623  
   624  // LessEqual returns a mask whose elements indicate whether x <= y
   625  //
   626  // Emulated, CPU Feature AVX2
   627  func (x Uint64x4) LessEqual(y Uint64x4) Mask64x4 {
   628  	a, b := x.AsInt64x4(), y.AsInt64x4()
   629  	ones := x.Equal(x).AsInt64x4()
   630  	signs := ones.ShiftAllLeft(64 - 1)
   631  	return a.Xor(signs).Greater(b.Xor(signs)).AsInt64x4().Xor(ones).asMask()
   632  }
   633  
   634  // NotEqual returns a mask whose elements indicate whether x != y
   635  //
   636  // Emulated, CPU Feature AVX2
   637  func (x Uint64x4) NotEqual(y Uint64x4) Mask64x4 {
   638  	a, b := x.AsInt64x4(), y.AsInt64x4()
   639  	ones := x.Equal(x).AsInt64x4()
   640  	return a.Equal(b).AsInt64x4().Xor(ones).asMask()
   641  }
   642  

View as plain text