gorgonia.org/tensor@v0.9.24/internal/execution/eng_cmp.go (about)

     1  // Code generated by genlib2. DO NOT EDIT.
     2  
     3  package execution
     4  
     5  import (
     6  	"reflect"
     7  
     8  	"github.com/pkg/errors"
     9  	"gorgonia.org/tensor/internal/storage"
    10  )
    11  
    12  func (e E) Gt(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header) (err error) {
    13  	as := isScalar(a, t)
    14  	bs := isScalar(b, t)
    15  	rs := isScalar(retVal, Bool)
    16  	rt := retVal.Bools()
    17  
    18  	if ((as && !bs) || (bs && !as)) && rs {
    19  		return errors.Errorf("retVal is a scalar. a: %d, b %d", a.TypedLen(t), b.TypedLen(t))
    20  	}
    21  
    22  	switch t {
    23  	case Int:
    24  		at := a.Ints()
    25  		bt := b.Ints()
    26  
    27  		switch {
    28  		case as && bs:
    29  			GtI(at, bt, rt)
    30  		case as && !bs:
    31  			GtSVI(at[0], bt, rt)
    32  		case !as && bs:
    33  			GtVSI(at, bt[0], rt)
    34  		default:
    35  			GtI(at, bt, rt)
    36  		}
    37  		return
    38  	case Int8:
    39  		at := a.Int8s()
    40  		bt := b.Int8s()
    41  
    42  		switch {
    43  		case as && bs:
    44  			GtI8(at, bt, rt)
    45  		case as && !bs:
    46  			GtSVI8(at[0], bt, rt)
    47  		case !as && bs:
    48  			GtVSI8(at, bt[0], rt)
    49  		default:
    50  			GtI8(at, bt, rt)
    51  		}
    52  		return
    53  	case Int16:
    54  		at := a.Int16s()
    55  		bt := b.Int16s()
    56  
    57  		switch {
    58  		case as && bs:
    59  			GtI16(at, bt, rt)
    60  		case as && !bs:
    61  			GtSVI16(at[0], bt, rt)
    62  		case !as && bs:
    63  			GtVSI16(at, bt[0], rt)
    64  		default:
    65  			GtI16(at, bt, rt)
    66  		}
    67  		return
    68  	case Int32:
    69  		at := a.Int32s()
    70  		bt := b.Int32s()
    71  
    72  		switch {
    73  		case as && bs:
    74  			GtI32(at, bt, rt)
    75  		case as && !bs:
    76  			GtSVI32(at[0], bt, rt)
    77  		case !as && bs:
    78  			GtVSI32(at, bt[0], rt)
    79  		default:
    80  			GtI32(at, bt, rt)
    81  		}
    82  		return
    83  	case Int64:
    84  		at := a.Int64s()
    85  		bt := b.Int64s()
    86  
    87  		switch {
    88  		case as && bs:
    89  			GtI64(at, bt, rt)
    90  		case as && !bs:
    91  			GtSVI64(at[0], bt, rt)
    92  		case !as && bs:
    93  			GtVSI64(at, bt[0], rt)
    94  		default:
    95  			GtI64(at, bt, rt)
    96  		}
    97  		return
    98  	case Uint:
    99  		at := a.Uints()
   100  		bt := b.Uints()
   101  
   102  		switch {
   103  		case as && bs:
   104  			GtU(at, bt, rt)
   105  		case as && !bs:
   106  			GtSVU(at[0], bt, rt)
   107  		case !as && bs:
   108  			GtVSU(at, bt[0], rt)
   109  		default:
   110  			GtU(at, bt, rt)
   111  		}
   112  		return
   113  	case Uint8:
   114  		at := a.Uint8s()
   115  		bt := b.Uint8s()
   116  
   117  		switch {
   118  		case as && bs:
   119  			GtU8(at, bt, rt)
   120  		case as && !bs:
   121  			GtSVU8(at[0], bt, rt)
   122  		case !as && bs:
   123  			GtVSU8(at, bt[0], rt)
   124  		default:
   125  			GtU8(at, bt, rt)
   126  		}
   127  		return
   128  	case Uint16:
   129  		at := a.Uint16s()
   130  		bt := b.Uint16s()
   131  
   132  		switch {
   133  		case as && bs:
   134  			GtU16(at, bt, rt)
   135  		case as && !bs:
   136  			GtSVU16(at[0], bt, rt)
   137  		case !as && bs:
   138  			GtVSU16(at, bt[0], rt)
   139  		default:
   140  			GtU16(at, bt, rt)
   141  		}
   142  		return
   143  	case Uint32:
   144  		at := a.Uint32s()
   145  		bt := b.Uint32s()
   146  
   147  		switch {
   148  		case as && bs:
   149  			GtU32(at, bt, rt)
   150  		case as && !bs:
   151  			GtSVU32(at[0], bt, rt)
   152  		case !as && bs:
   153  			GtVSU32(at, bt[0], rt)
   154  		default:
   155  			GtU32(at, bt, rt)
   156  		}
   157  		return
   158  	case Uint64:
   159  		at := a.Uint64s()
   160  		bt := b.Uint64s()
   161  
   162  		switch {
   163  		case as && bs:
   164  			GtU64(at, bt, rt)
   165  		case as && !bs:
   166  			GtSVU64(at[0], bt, rt)
   167  		case !as && bs:
   168  			GtVSU64(at, bt[0], rt)
   169  		default:
   170  			GtU64(at, bt, rt)
   171  		}
   172  		return
   173  	case Float32:
   174  		at := a.Float32s()
   175  		bt := b.Float32s()
   176  
   177  		switch {
   178  		case as && bs:
   179  			GtF32(at, bt, rt)
   180  		case as && !bs:
   181  			GtSVF32(at[0], bt, rt)
   182  		case !as && bs:
   183  			GtVSF32(at, bt[0], rt)
   184  		default:
   185  			GtF32(at, bt, rt)
   186  		}
   187  		return
   188  	case Float64:
   189  		at := a.Float64s()
   190  		bt := b.Float64s()
   191  
   192  		switch {
   193  		case as && bs:
   194  			GtF64(at, bt, rt)
   195  		case as && !bs:
   196  			GtSVF64(at[0], bt, rt)
   197  		case !as && bs:
   198  			GtVSF64(at, bt[0], rt)
   199  		default:
   200  			GtF64(at, bt, rt)
   201  		}
   202  		return
   203  	case String:
   204  		at := a.Strings()
   205  		bt := b.Strings()
   206  
   207  		switch {
   208  		case as && bs:
   209  			GtStr(at, bt, rt)
   210  		case as && !bs:
   211  			GtSVStr(at[0], bt, rt)
   212  		case !as && bs:
   213  			GtVSStr(at, bt[0], rt)
   214  		default:
   215  			GtStr(at, bt, rt)
   216  		}
   217  		return
   218  	default:
   219  		return errors.Errorf("Unsupported type %v for Gt", t)
   220  	}
   221  }
   222  
   223  func (e E) Gte(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header) (err error) {
   224  	as := isScalar(a, t)
   225  	bs := isScalar(b, t)
   226  	rs := isScalar(retVal, Bool)
   227  	rt := retVal.Bools()
   228  
   229  	if ((as && !bs) || (bs && !as)) && rs {
   230  		return errors.Errorf("retVal is a scalar. a: %d, b %d", a.TypedLen(t), b.TypedLen(t))
   231  	}
   232  
   233  	switch t {
   234  	case Int:
   235  		at := a.Ints()
   236  		bt := b.Ints()
   237  
   238  		switch {
   239  		case as && bs:
   240  			GteI(at, bt, rt)
   241  		case as && !bs:
   242  			GteSVI(at[0], bt, rt)
   243  		case !as && bs:
   244  			GteVSI(at, bt[0], rt)
   245  		default:
   246  			GteI(at, bt, rt)
   247  		}
   248  		return
   249  	case Int8:
   250  		at := a.Int8s()
   251  		bt := b.Int8s()
   252  
   253  		switch {
   254  		case as && bs:
   255  			GteI8(at, bt, rt)
   256  		case as && !bs:
   257  			GteSVI8(at[0], bt, rt)
   258  		case !as && bs:
   259  			GteVSI8(at, bt[0], rt)
   260  		default:
   261  			GteI8(at, bt, rt)
   262  		}
   263  		return
   264  	case Int16:
   265  		at := a.Int16s()
   266  		bt := b.Int16s()
   267  
   268  		switch {
   269  		case as && bs:
   270  			GteI16(at, bt, rt)
   271  		case as && !bs:
   272  			GteSVI16(at[0], bt, rt)
   273  		case !as && bs:
   274  			GteVSI16(at, bt[0], rt)
   275  		default:
   276  			GteI16(at, bt, rt)
   277  		}
   278  		return
   279  	case Int32:
   280  		at := a.Int32s()
   281  		bt := b.Int32s()
   282  
   283  		switch {
   284  		case as && bs:
   285  			GteI32(at, bt, rt)
   286  		case as && !bs:
   287  			GteSVI32(at[0], bt, rt)
   288  		case !as && bs:
   289  			GteVSI32(at, bt[0], rt)
   290  		default:
   291  			GteI32(at, bt, rt)
   292  		}
   293  		return
   294  	case Int64:
   295  		at := a.Int64s()
   296  		bt := b.Int64s()
   297  
   298  		switch {
   299  		case as && bs:
   300  			GteI64(at, bt, rt)
   301  		case as && !bs:
   302  			GteSVI64(at[0], bt, rt)
   303  		case !as && bs:
   304  			GteVSI64(at, bt[0], rt)
   305  		default:
   306  			GteI64(at, bt, rt)
   307  		}
   308  		return
   309  	case Uint:
   310  		at := a.Uints()
   311  		bt := b.Uints()
   312  
   313  		switch {
   314  		case as && bs:
   315  			GteU(at, bt, rt)
   316  		case as && !bs:
   317  			GteSVU(at[0], bt, rt)
   318  		case !as && bs:
   319  			GteVSU(at, bt[0], rt)
   320  		default:
   321  			GteU(at, bt, rt)
   322  		}
   323  		return
   324  	case Uint8:
   325  		at := a.Uint8s()
   326  		bt := b.Uint8s()
   327  
   328  		switch {
   329  		case as && bs:
   330  			GteU8(at, bt, rt)
   331  		case as && !bs:
   332  			GteSVU8(at[0], bt, rt)
   333  		case !as && bs:
   334  			GteVSU8(at, bt[0], rt)
   335  		default:
   336  			GteU8(at, bt, rt)
   337  		}
   338  		return
   339  	case Uint16:
   340  		at := a.Uint16s()
   341  		bt := b.Uint16s()
   342  
   343  		switch {
   344  		case as && bs:
   345  			GteU16(at, bt, rt)
   346  		case as && !bs:
   347  			GteSVU16(at[0], bt, rt)
   348  		case !as && bs:
   349  			GteVSU16(at, bt[0], rt)
   350  		default:
   351  			GteU16(at, bt, rt)
   352  		}
   353  		return
   354  	case Uint32:
   355  		at := a.Uint32s()
   356  		bt := b.Uint32s()
   357  
   358  		switch {
   359  		case as && bs:
   360  			GteU32(at, bt, rt)
   361  		case as && !bs:
   362  			GteSVU32(at[0], bt, rt)
   363  		case !as && bs:
   364  			GteVSU32(at, bt[0], rt)
   365  		default:
   366  			GteU32(at, bt, rt)
   367  		}
   368  		return
   369  	case Uint64:
   370  		at := a.Uint64s()
   371  		bt := b.Uint64s()
   372  
   373  		switch {
   374  		case as && bs:
   375  			GteU64(at, bt, rt)
   376  		case as && !bs:
   377  			GteSVU64(at[0], bt, rt)
   378  		case !as && bs:
   379  			GteVSU64(at, bt[0], rt)
   380  		default:
   381  			GteU64(at, bt, rt)
   382  		}
   383  		return
   384  	case Float32:
   385  		at := a.Float32s()
   386  		bt := b.Float32s()
   387  
   388  		switch {
   389  		case as && bs:
   390  			GteF32(at, bt, rt)
   391  		case as && !bs:
   392  			GteSVF32(at[0], bt, rt)
   393  		case !as && bs:
   394  			GteVSF32(at, bt[0], rt)
   395  		default:
   396  			GteF32(at, bt, rt)
   397  		}
   398  		return
   399  	case Float64:
   400  		at := a.Float64s()
   401  		bt := b.Float64s()
   402  
   403  		switch {
   404  		case as && bs:
   405  			GteF64(at, bt, rt)
   406  		case as && !bs:
   407  			GteSVF64(at[0], bt, rt)
   408  		case !as && bs:
   409  			GteVSF64(at, bt[0], rt)
   410  		default:
   411  			GteF64(at, bt, rt)
   412  		}
   413  		return
   414  	case String:
   415  		at := a.Strings()
   416  		bt := b.Strings()
   417  
   418  		switch {
   419  		case as && bs:
   420  			GteStr(at, bt, rt)
   421  		case as && !bs:
   422  			GteSVStr(at[0], bt, rt)
   423  		case !as && bs:
   424  			GteVSStr(at, bt[0], rt)
   425  		default:
   426  			GteStr(at, bt, rt)
   427  		}
   428  		return
   429  	default:
   430  		return errors.Errorf("Unsupported type %v for Gte", t)
   431  	}
   432  }
   433  
   434  func (e E) Lt(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header) (err error) {
   435  	as := isScalar(a, t)
   436  	bs := isScalar(b, t)
   437  	rs := isScalar(retVal, Bool)
   438  	rt := retVal.Bools()
   439  
   440  	if ((as && !bs) || (bs && !as)) && rs {
   441  		return errors.Errorf("retVal is a scalar. a: %d, b %d", a.TypedLen(t), b.TypedLen(t))
   442  	}
   443  
   444  	switch t {
   445  	case Int:
   446  		at := a.Ints()
   447  		bt := b.Ints()
   448  
   449  		switch {
   450  		case as && bs:
   451  			LtI(at, bt, rt)
   452  		case as && !bs:
   453  			LtSVI(at[0], bt, rt)
   454  		case !as && bs:
   455  			LtVSI(at, bt[0], rt)
   456  		default:
   457  			LtI(at, bt, rt)
   458  		}
   459  		return
   460  	case Int8:
   461  		at := a.Int8s()
   462  		bt := b.Int8s()
   463  
   464  		switch {
   465  		case as && bs:
   466  			LtI8(at, bt, rt)
   467  		case as && !bs:
   468  			LtSVI8(at[0], bt, rt)
   469  		case !as && bs:
   470  			LtVSI8(at, bt[0], rt)
   471  		default:
   472  			LtI8(at, bt, rt)
   473  		}
   474  		return
   475  	case Int16:
   476  		at := a.Int16s()
   477  		bt := b.Int16s()
   478  
   479  		switch {
   480  		case as && bs:
   481  			LtI16(at, bt, rt)
   482  		case as && !bs:
   483  			LtSVI16(at[0], bt, rt)
   484  		case !as && bs:
   485  			LtVSI16(at, bt[0], rt)
   486  		default:
   487  			LtI16(at, bt, rt)
   488  		}
   489  		return
   490  	case Int32:
   491  		at := a.Int32s()
   492  		bt := b.Int32s()
   493  
   494  		switch {
   495  		case as && bs:
   496  			LtI32(at, bt, rt)
   497  		case as && !bs:
   498  			LtSVI32(at[0], bt, rt)
   499  		case !as && bs:
   500  			LtVSI32(at, bt[0], rt)
   501  		default:
   502  			LtI32(at, bt, rt)
   503  		}
   504  		return
   505  	case Int64:
   506  		at := a.Int64s()
   507  		bt := b.Int64s()
   508  
   509  		switch {
   510  		case as && bs:
   511  			LtI64(at, bt, rt)
   512  		case as && !bs:
   513  			LtSVI64(at[0], bt, rt)
   514  		case !as && bs:
   515  			LtVSI64(at, bt[0], rt)
   516  		default:
   517  			LtI64(at, bt, rt)
   518  		}
   519  		return
   520  	case Uint:
   521  		at := a.Uints()
   522  		bt := b.Uints()
   523  
   524  		switch {
   525  		case as && bs:
   526  			LtU(at, bt, rt)
   527  		case as && !bs:
   528  			LtSVU(at[0], bt, rt)
   529  		case !as && bs:
   530  			LtVSU(at, bt[0], rt)
   531  		default:
   532  			LtU(at, bt, rt)
   533  		}
   534  		return
   535  	case Uint8:
   536  		at := a.Uint8s()
   537  		bt := b.Uint8s()
   538  
   539  		switch {
   540  		case as && bs:
   541  			LtU8(at, bt, rt)
   542  		case as && !bs:
   543  			LtSVU8(at[0], bt, rt)
   544  		case !as && bs:
   545  			LtVSU8(at, bt[0], rt)
   546  		default:
   547  			LtU8(at, bt, rt)
   548  		}
   549  		return
   550  	case Uint16:
   551  		at := a.Uint16s()
   552  		bt := b.Uint16s()
   553  
   554  		switch {
   555  		case as && bs:
   556  			LtU16(at, bt, rt)
   557  		case as && !bs:
   558  			LtSVU16(at[0], bt, rt)
   559  		case !as && bs:
   560  			LtVSU16(at, bt[0], rt)
   561  		default:
   562  			LtU16(at, bt, rt)
   563  		}
   564  		return
   565  	case Uint32:
   566  		at := a.Uint32s()
   567  		bt := b.Uint32s()
   568  
   569  		switch {
   570  		case as && bs:
   571  			LtU32(at, bt, rt)
   572  		case as && !bs:
   573  			LtSVU32(at[0], bt, rt)
   574  		case !as && bs:
   575  			LtVSU32(at, bt[0], rt)
   576  		default:
   577  			LtU32(at, bt, rt)
   578  		}
   579  		return
   580  	case Uint64:
   581  		at := a.Uint64s()
   582  		bt := b.Uint64s()
   583  
   584  		switch {
   585  		case as && bs:
   586  			LtU64(at, bt, rt)
   587  		case as && !bs:
   588  			LtSVU64(at[0], bt, rt)
   589  		case !as && bs:
   590  			LtVSU64(at, bt[0], rt)
   591  		default:
   592  			LtU64(at, bt, rt)
   593  		}
   594  		return
   595  	case Float32:
   596  		at := a.Float32s()
   597  		bt := b.Float32s()
   598  
   599  		switch {
   600  		case as && bs:
   601  			LtF32(at, bt, rt)
   602  		case as && !bs:
   603  			LtSVF32(at[0], bt, rt)
   604  		case !as && bs:
   605  			LtVSF32(at, bt[0], rt)
   606  		default:
   607  			LtF32(at, bt, rt)
   608  		}
   609  		return
   610  	case Float64:
   611  		at := a.Float64s()
   612  		bt := b.Float64s()
   613  
   614  		switch {
   615  		case as && bs:
   616  			LtF64(at, bt, rt)
   617  		case as && !bs:
   618  			LtSVF64(at[0], bt, rt)
   619  		case !as && bs:
   620  			LtVSF64(at, bt[0], rt)
   621  		default:
   622  			LtF64(at, bt, rt)
   623  		}
   624  		return
   625  	case String:
   626  		at := a.Strings()
   627  		bt := b.Strings()
   628  
   629  		switch {
   630  		case as && bs:
   631  			LtStr(at, bt, rt)
   632  		case as && !bs:
   633  			LtSVStr(at[0], bt, rt)
   634  		case !as && bs:
   635  			LtVSStr(at, bt[0], rt)
   636  		default:
   637  			LtStr(at, bt, rt)
   638  		}
   639  		return
   640  	default:
   641  		return errors.Errorf("Unsupported type %v for Lt", t)
   642  	}
   643  }
   644  
   645  func (e E) Lte(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header) (err error) {
   646  	as := isScalar(a, t)
   647  	bs := isScalar(b, t)
   648  	rs := isScalar(retVal, Bool)
   649  	rt := retVal.Bools()
   650  
   651  	if ((as && !bs) || (bs && !as)) && rs {
   652  		return errors.Errorf("retVal is a scalar. a: %d, b %d", a.TypedLen(t), b.TypedLen(t))
   653  	}
   654  
   655  	switch t {
   656  	case Int:
   657  		at := a.Ints()
   658  		bt := b.Ints()
   659  
   660  		switch {
   661  		case as && bs:
   662  			LteI(at, bt, rt)
   663  		case as && !bs:
   664  			LteSVI(at[0], bt, rt)
   665  		case !as && bs:
   666  			LteVSI(at, bt[0], rt)
   667  		default:
   668  			LteI(at, bt, rt)
   669  		}
   670  		return
   671  	case Int8:
   672  		at := a.Int8s()
   673  		bt := b.Int8s()
   674  
   675  		switch {
   676  		case as && bs:
   677  			LteI8(at, bt, rt)
   678  		case as && !bs:
   679  			LteSVI8(at[0], bt, rt)
   680  		case !as && bs:
   681  			LteVSI8(at, bt[0], rt)
   682  		default:
   683  			LteI8(at, bt, rt)
   684  		}
   685  		return
   686  	case Int16:
   687  		at := a.Int16s()
   688  		bt := b.Int16s()
   689  
   690  		switch {
   691  		case as && bs:
   692  			LteI16(at, bt, rt)
   693  		case as && !bs:
   694  			LteSVI16(at[0], bt, rt)
   695  		case !as && bs:
   696  			LteVSI16(at, bt[0], rt)
   697  		default:
   698  			LteI16(at, bt, rt)
   699  		}
   700  		return
   701  	case Int32:
   702  		at := a.Int32s()
   703  		bt := b.Int32s()
   704  
   705  		switch {
   706  		case as && bs:
   707  			LteI32(at, bt, rt)
   708  		case as && !bs:
   709  			LteSVI32(at[0], bt, rt)
   710  		case !as && bs:
   711  			LteVSI32(at, bt[0], rt)
   712  		default:
   713  			LteI32(at, bt, rt)
   714  		}
   715  		return
   716  	case Int64:
   717  		at := a.Int64s()
   718  		bt := b.Int64s()
   719  
   720  		switch {
   721  		case as && bs:
   722  			LteI64(at, bt, rt)
   723  		case as && !bs:
   724  			LteSVI64(at[0], bt, rt)
   725  		case !as && bs:
   726  			LteVSI64(at, bt[0], rt)
   727  		default:
   728  			LteI64(at, bt, rt)
   729  		}
   730  		return
   731  	case Uint:
   732  		at := a.Uints()
   733  		bt := b.Uints()
   734  
   735  		switch {
   736  		case as && bs:
   737  			LteU(at, bt, rt)
   738  		case as && !bs:
   739  			LteSVU(at[0], bt, rt)
   740  		case !as && bs:
   741  			LteVSU(at, bt[0], rt)
   742  		default:
   743  			LteU(at, bt, rt)
   744  		}
   745  		return
   746  	case Uint8:
   747  		at := a.Uint8s()
   748  		bt := b.Uint8s()
   749  
   750  		switch {
   751  		case as && bs:
   752  			LteU8(at, bt, rt)
   753  		case as && !bs:
   754  			LteSVU8(at[0], bt, rt)
   755  		case !as && bs:
   756  			LteVSU8(at, bt[0], rt)
   757  		default:
   758  			LteU8(at, bt, rt)
   759  		}
   760  		return
   761  	case Uint16:
   762  		at := a.Uint16s()
   763  		bt := b.Uint16s()
   764  
   765  		switch {
   766  		case as && bs:
   767  			LteU16(at, bt, rt)
   768  		case as && !bs:
   769  			LteSVU16(at[0], bt, rt)
   770  		case !as && bs:
   771  			LteVSU16(at, bt[0], rt)
   772  		default:
   773  			LteU16(at, bt, rt)
   774  		}
   775  		return
   776  	case Uint32:
   777  		at := a.Uint32s()
   778  		bt := b.Uint32s()
   779  
   780  		switch {
   781  		case as && bs:
   782  			LteU32(at, bt, rt)
   783  		case as && !bs:
   784  			LteSVU32(at[0], bt, rt)
   785  		case !as && bs:
   786  			LteVSU32(at, bt[0], rt)
   787  		default:
   788  			LteU32(at, bt, rt)
   789  		}
   790  		return
   791  	case Uint64:
   792  		at := a.Uint64s()
   793  		bt := b.Uint64s()
   794  
   795  		switch {
   796  		case as && bs:
   797  			LteU64(at, bt, rt)
   798  		case as && !bs:
   799  			LteSVU64(at[0], bt, rt)
   800  		case !as && bs:
   801  			LteVSU64(at, bt[0], rt)
   802  		default:
   803  			LteU64(at, bt, rt)
   804  		}
   805  		return
   806  	case Float32:
   807  		at := a.Float32s()
   808  		bt := b.Float32s()
   809  
   810  		switch {
   811  		case as && bs:
   812  			LteF32(at, bt, rt)
   813  		case as && !bs:
   814  			LteSVF32(at[0], bt, rt)
   815  		case !as && bs:
   816  			LteVSF32(at, bt[0], rt)
   817  		default:
   818  			LteF32(at, bt, rt)
   819  		}
   820  		return
   821  	case Float64:
   822  		at := a.Float64s()
   823  		bt := b.Float64s()
   824  
   825  		switch {
   826  		case as && bs:
   827  			LteF64(at, bt, rt)
   828  		case as && !bs:
   829  			LteSVF64(at[0], bt, rt)
   830  		case !as && bs:
   831  			LteVSF64(at, bt[0], rt)
   832  		default:
   833  			LteF64(at, bt, rt)
   834  		}
   835  		return
   836  	case String:
   837  		at := a.Strings()
   838  		bt := b.Strings()
   839  
   840  		switch {
   841  		case as && bs:
   842  			LteStr(at, bt, rt)
   843  		case as && !bs:
   844  			LteSVStr(at[0], bt, rt)
   845  		case !as && bs:
   846  			LteVSStr(at, bt[0], rt)
   847  		default:
   848  			LteStr(at, bt, rt)
   849  		}
   850  		return
   851  	default:
   852  		return errors.Errorf("Unsupported type %v for Lte", t)
   853  	}
   854  }
   855  
   856  func (e E) Eq(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header) (err error) {
   857  	as := isScalar(a, t)
   858  	bs := isScalar(b, t)
   859  	rs := isScalar(retVal, Bool)
   860  	rt := retVal.Bools()
   861  
   862  	if ((as && !bs) || (bs && !as)) && rs {
   863  		return errors.Errorf("retVal is a scalar. a: %d, b %d", a.TypedLen(t), b.TypedLen(t))
   864  	}
   865  
   866  	switch t {
   867  	case Bool:
   868  		at := a.Bools()
   869  		bt := b.Bools()
   870  
   871  		switch {
   872  		case as && bs:
   873  			EqB(at, bt, rt)
   874  		case as && !bs:
   875  			EqSVB(at[0], bt, rt)
   876  		case !as && bs:
   877  			EqVSB(at, bt[0], rt)
   878  		default:
   879  			EqB(at, bt, rt)
   880  		}
   881  		return
   882  	case Int:
   883  		at := a.Ints()
   884  		bt := b.Ints()
   885  
   886  		switch {
   887  		case as && bs:
   888  			EqI(at, bt, rt)
   889  		case as && !bs:
   890  			EqSVI(at[0], bt, rt)
   891  		case !as && bs:
   892  			EqVSI(at, bt[0], rt)
   893  		default:
   894  			EqI(at, bt, rt)
   895  		}
   896  		return
   897  	case Int8:
   898  		at := a.Int8s()
   899  		bt := b.Int8s()
   900  
   901  		switch {
   902  		case as && bs:
   903  			EqI8(at, bt, rt)
   904  		case as && !bs:
   905  			EqSVI8(at[0], bt, rt)
   906  		case !as && bs:
   907  			EqVSI8(at, bt[0], rt)
   908  		default:
   909  			EqI8(at, bt, rt)
   910  		}
   911  		return
   912  	case Int16:
   913  		at := a.Int16s()
   914  		bt := b.Int16s()
   915  
   916  		switch {
   917  		case as && bs:
   918  			EqI16(at, bt, rt)
   919  		case as && !bs:
   920  			EqSVI16(at[0], bt, rt)
   921  		case !as && bs:
   922  			EqVSI16(at, bt[0], rt)
   923  		default:
   924  			EqI16(at, bt, rt)
   925  		}
   926  		return
   927  	case Int32:
   928  		at := a.Int32s()
   929  		bt := b.Int32s()
   930  
   931  		switch {
   932  		case as && bs:
   933  			EqI32(at, bt, rt)
   934  		case as && !bs:
   935  			EqSVI32(at[0], bt, rt)
   936  		case !as && bs:
   937  			EqVSI32(at, bt[0], rt)
   938  		default:
   939  			EqI32(at, bt, rt)
   940  		}
   941  		return
   942  	case Int64:
   943  		at := a.Int64s()
   944  		bt := b.Int64s()
   945  
   946  		switch {
   947  		case as && bs:
   948  			EqI64(at, bt, rt)
   949  		case as && !bs:
   950  			EqSVI64(at[0], bt, rt)
   951  		case !as && bs:
   952  			EqVSI64(at, bt[0], rt)
   953  		default:
   954  			EqI64(at, bt, rt)
   955  		}
   956  		return
   957  	case Uint:
   958  		at := a.Uints()
   959  		bt := b.Uints()
   960  
   961  		switch {
   962  		case as && bs:
   963  			EqU(at, bt, rt)
   964  		case as && !bs:
   965  			EqSVU(at[0], bt, rt)
   966  		case !as && bs:
   967  			EqVSU(at, bt[0], rt)
   968  		default:
   969  			EqU(at, bt, rt)
   970  		}
   971  		return
   972  	case Uint8:
   973  		at := a.Uint8s()
   974  		bt := b.Uint8s()
   975  
   976  		switch {
   977  		case as && bs:
   978  			EqU8(at, bt, rt)
   979  		case as && !bs:
   980  			EqSVU8(at[0], bt, rt)
   981  		case !as && bs:
   982  			EqVSU8(at, bt[0], rt)
   983  		default:
   984  			EqU8(at, bt, rt)
   985  		}
   986  		return
   987  	case Uint16:
   988  		at := a.Uint16s()
   989  		bt := b.Uint16s()
   990  
   991  		switch {
   992  		case as && bs:
   993  			EqU16(at, bt, rt)
   994  		case as && !bs:
   995  			EqSVU16(at[0], bt, rt)
   996  		case !as && bs:
   997  			EqVSU16(at, bt[0], rt)
   998  		default:
   999  			EqU16(at, bt, rt)
  1000  		}
  1001  		return
  1002  	case Uint32:
  1003  		at := a.Uint32s()
  1004  		bt := b.Uint32s()
  1005  
  1006  		switch {
  1007  		case as && bs:
  1008  			EqU32(at, bt, rt)
  1009  		case as && !bs:
  1010  			EqSVU32(at[0], bt, rt)
  1011  		case !as && bs:
  1012  			EqVSU32(at, bt[0], rt)
  1013  		default:
  1014  			EqU32(at, bt, rt)
  1015  		}
  1016  		return
  1017  	case Uint64:
  1018  		at := a.Uint64s()
  1019  		bt := b.Uint64s()
  1020  
  1021  		switch {
  1022  		case as && bs:
  1023  			EqU64(at, bt, rt)
  1024  		case as && !bs:
  1025  			EqSVU64(at[0], bt, rt)
  1026  		case !as && bs:
  1027  			EqVSU64(at, bt[0], rt)
  1028  		default:
  1029  			EqU64(at, bt, rt)
  1030  		}
  1031  		return
  1032  	case Uintptr:
  1033  		at := a.Uintptrs()
  1034  		bt := b.Uintptrs()
  1035  
  1036  		switch {
  1037  		case as && bs:
  1038  			EqUintptr(at, bt, rt)
  1039  		case as && !bs:
  1040  			EqSVUintptr(at[0], bt, rt)
  1041  		case !as && bs:
  1042  			EqVSUintptr(at, bt[0], rt)
  1043  		default:
  1044  			EqUintptr(at, bt, rt)
  1045  		}
  1046  		return
  1047  	case Float32:
  1048  		at := a.Float32s()
  1049  		bt := b.Float32s()
  1050  
  1051  		switch {
  1052  		case as && bs:
  1053  			EqF32(at, bt, rt)
  1054  		case as && !bs:
  1055  			EqSVF32(at[0], bt, rt)
  1056  		case !as && bs:
  1057  			EqVSF32(at, bt[0], rt)
  1058  		default:
  1059  			EqF32(at, bt, rt)
  1060  		}
  1061  		return
  1062  	case Float64:
  1063  		at := a.Float64s()
  1064  		bt := b.Float64s()
  1065  
  1066  		switch {
  1067  		case as && bs:
  1068  			EqF64(at, bt, rt)
  1069  		case as && !bs:
  1070  			EqSVF64(at[0], bt, rt)
  1071  		case !as && bs:
  1072  			EqVSF64(at, bt[0], rt)
  1073  		default:
  1074  			EqF64(at, bt, rt)
  1075  		}
  1076  		return
  1077  	case Complex64:
  1078  		at := a.Complex64s()
  1079  		bt := b.Complex64s()
  1080  
  1081  		switch {
  1082  		case as && bs:
  1083  			EqC64(at, bt, rt)
  1084  		case as && !bs:
  1085  			EqSVC64(at[0], bt, rt)
  1086  		case !as && bs:
  1087  			EqVSC64(at, bt[0], rt)
  1088  		default:
  1089  			EqC64(at, bt, rt)
  1090  		}
  1091  		return
  1092  	case Complex128:
  1093  		at := a.Complex128s()
  1094  		bt := b.Complex128s()
  1095  
  1096  		switch {
  1097  		case as && bs:
  1098  			EqC128(at, bt, rt)
  1099  		case as && !bs:
  1100  			EqSVC128(at[0], bt, rt)
  1101  		case !as && bs:
  1102  			EqVSC128(at, bt[0], rt)
  1103  		default:
  1104  			EqC128(at, bt, rt)
  1105  		}
  1106  		return
  1107  	case String:
  1108  		at := a.Strings()
  1109  		bt := b.Strings()
  1110  
  1111  		switch {
  1112  		case as && bs:
  1113  			EqStr(at, bt, rt)
  1114  		case as && !bs:
  1115  			EqSVStr(at[0], bt, rt)
  1116  		case !as && bs:
  1117  			EqVSStr(at, bt[0], rt)
  1118  		default:
  1119  			EqStr(at, bt, rt)
  1120  		}
  1121  		return
  1122  	case UnsafePointer:
  1123  		at := a.UnsafePointers()
  1124  		bt := b.UnsafePointers()
  1125  
  1126  		switch {
  1127  		case as && bs:
  1128  			EqUnsafePointer(at, bt, rt)
  1129  		case as && !bs:
  1130  			EqSVUnsafePointer(at[0], bt, rt)
  1131  		case !as && bs:
  1132  			EqVSUnsafePointer(at, bt[0], rt)
  1133  		default:
  1134  			EqUnsafePointer(at, bt, rt)
  1135  		}
  1136  		return
  1137  	default:
  1138  		return errors.Errorf("Unsupported type %v for Eq", t)
  1139  	}
  1140  }
  1141  
  1142  func (e E) Ne(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header) (err error) {
  1143  	as := isScalar(a, t)
  1144  	bs := isScalar(b, t)
  1145  	rs := isScalar(retVal, Bool)
  1146  	rt := retVal.Bools()
  1147  
  1148  	if ((as && !bs) || (bs && !as)) && rs {
  1149  		return errors.Errorf("retVal is a scalar. a: %d, b %d", a.TypedLen(t), b.TypedLen(t))
  1150  	}
  1151  
  1152  	switch t {
  1153  	case Bool:
  1154  		at := a.Bools()
  1155  		bt := b.Bools()
  1156  
  1157  		switch {
  1158  		case as && bs:
  1159  			NeB(at, bt, rt)
  1160  		case as && !bs:
  1161  			NeSVB(at[0], bt, rt)
  1162  		case !as && bs:
  1163  			NeVSB(at, bt[0], rt)
  1164  		default:
  1165  			NeB(at, bt, rt)
  1166  		}
  1167  		return
  1168  	case Int:
  1169  		at := a.Ints()
  1170  		bt := b.Ints()
  1171  
  1172  		switch {
  1173  		case as && bs:
  1174  			NeI(at, bt, rt)
  1175  		case as && !bs:
  1176  			NeSVI(at[0], bt, rt)
  1177  		case !as && bs:
  1178  			NeVSI(at, bt[0], rt)
  1179  		default:
  1180  			NeI(at, bt, rt)
  1181  		}
  1182  		return
  1183  	case Int8:
  1184  		at := a.Int8s()
  1185  		bt := b.Int8s()
  1186  
  1187  		switch {
  1188  		case as && bs:
  1189  			NeI8(at, bt, rt)
  1190  		case as && !bs:
  1191  			NeSVI8(at[0], bt, rt)
  1192  		case !as && bs:
  1193  			NeVSI8(at, bt[0], rt)
  1194  		default:
  1195  			NeI8(at, bt, rt)
  1196  		}
  1197  		return
  1198  	case Int16:
  1199  		at := a.Int16s()
  1200  		bt := b.Int16s()
  1201  
  1202  		switch {
  1203  		case as && bs:
  1204  			NeI16(at, bt, rt)
  1205  		case as && !bs:
  1206  			NeSVI16(at[0], bt, rt)
  1207  		case !as && bs:
  1208  			NeVSI16(at, bt[0], rt)
  1209  		default:
  1210  			NeI16(at, bt, rt)
  1211  		}
  1212  		return
  1213  	case Int32:
  1214  		at := a.Int32s()
  1215  		bt := b.Int32s()
  1216  
  1217  		switch {
  1218  		case as && bs:
  1219  			NeI32(at, bt, rt)
  1220  		case as && !bs:
  1221  			NeSVI32(at[0], bt, rt)
  1222  		case !as && bs:
  1223  			NeVSI32(at, bt[0], rt)
  1224  		default:
  1225  			NeI32(at, bt, rt)
  1226  		}
  1227  		return
  1228  	case Int64:
  1229  		at := a.Int64s()
  1230  		bt := b.Int64s()
  1231  
  1232  		switch {
  1233  		case as && bs:
  1234  			NeI64(at, bt, rt)
  1235  		case as && !bs:
  1236  			NeSVI64(at[0], bt, rt)
  1237  		case !as && bs:
  1238  			NeVSI64(at, bt[0], rt)
  1239  		default:
  1240  			NeI64(at, bt, rt)
  1241  		}
  1242  		return
  1243  	case Uint:
  1244  		at := a.Uints()
  1245  		bt := b.Uints()
  1246  
  1247  		switch {
  1248  		case as && bs:
  1249  			NeU(at, bt, rt)
  1250  		case as && !bs:
  1251  			NeSVU(at[0], bt, rt)
  1252  		case !as && bs:
  1253  			NeVSU(at, bt[0], rt)
  1254  		default:
  1255  			NeU(at, bt, rt)
  1256  		}
  1257  		return
  1258  	case Uint8:
  1259  		at := a.Uint8s()
  1260  		bt := b.Uint8s()
  1261  
  1262  		switch {
  1263  		case as && bs:
  1264  			NeU8(at, bt, rt)
  1265  		case as && !bs:
  1266  			NeSVU8(at[0], bt, rt)
  1267  		case !as && bs:
  1268  			NeVSU8(at, bt[0], rt)
  1269  		default:
  1270  			NeU8(at, bt, rt)
  1271  		}
  1272  		return
  1273  	case Uint16:
  1274  		at := a.Uint16s()
  1275  		bt := b.Uint16s()
  1276  
  1277  		switch {
  1278  		case as && bs:
  1279  			NeU16(at, bt, rt)
  1280  		case as && !bs:
  1281  			NeSVU16(at[0], bt, rt)
  1282  		case !as && bs:
  1283  			NeVSU16(at, bt[0], rt)
  1284  		default:
  1285  			NeU16(at, bt, rt)
  1286  		}
  1287  		return
  1288  	case Uint32:
  1289  		at := a.Uint32s()
  1290  		bt := b.Uint32s()
  1291  
  1292  		switch {
  1293  		case as && bs:
  1294  			NeU32(at, bt, rt)
  1295  		case as && !bs:
  1296  			NeSVU32(at[0], bt, rt)
  1297  		case !as && bs:
  1298  			NeVSU32(at, bt[0], rt)
  1299  		default:
  1300  			NeU32(at, bt, rt)
  1301  		}
  1302  		return
  1303  	case Uint64:
  1304  		at := a.Uint64s()
  1305  		bt := b.Uint64s()
  1306  
  1307  		switch {
  1308  		case as && bs:
  1309  			NeU64(at, bt, rt)
  1310  		case as && !bs:
  1311  			NeSVU64(at[0], bt, rt)
  1312  		case !as && bs:
  1313  			NeVSU64(at, bt[0], rt)
  1314  		default:
  1315  			NeU64(at, bt, rt)
  1316  		}
  1317  		return
  1318  	case Uintptr:
  1319  		at := a.Uintptrs()
  1320  		bt := b.Uintptrs()
  1321  
  1322  		switch {
  1323  		case as && bs:
  1324  			NeUintptr(at, bt, rt)
  1325  		case as && !bs:
  1326  			NeSVUintptr(at[0], bt, rt)
  1327  		case !as && bs:
  1328  			NeVSUintptr(at, bt[0], rt)
  1329  		default:
  1330  			NeUintptr(at, bt, rt)
  1331  		}
  1332  		return
  1333  	case Float32:
  1334  		at := a.Float32s()
  1335  		bt := b.Float32s()
  1336  
  1337  		switch {
  1338  		case as && bs:
  1339  			NeF32(at, bt, rt)
  1340  		case as && !bs:
  1341  			NeSVF32(at[0], bt, rt)
  1342  		case !as && bs:
  1343  			NeVSF32(at, bt[0], rt)
  1344  		default:
  1345  			NeF32(at, bt, rt)
  1346  		}
  1347  		return
  1348  	case Float64:
  1349  		at := a.Float64s()
  1350  		bt := b.Float64s()
  1351  
  1352  		switch {
  1353  		case as && bs:
  1354  			NeF64(at, bt, rt)
  1355  		case as && !bs:
  1356  			NeSVF64(at[0], bt, rt)
  1357  		case !as && bs:
  1358  			NeVSF64(at, bt[0], rt)
  1359  		default:
  1360  			NeF64(at, bt, rt)
  1361  		}
  1362  		return
  1363  	case Complex64:
  1364  		at := a.Complex64s()
  1365  		bt := b.Complex64s()
  1366  
  1367  		switch {
  1368  		case as && bs:
  1369  			NeC64(at, bt, rt)
  1370  		case as && !bs:
  1371  			NeSVC64(at[0], bt, rt)
  1372  		case !as && bs:
  1373  			NeVSC64(at, bt[0], rt)
  1374  		default:
  1375  			NeC64(at, bt, rt)
  1376  		}
  1377  		return
  1378  	case Complex128:
  1379  		at := a.Complex128s()
  1380  		bt := b.Complex128s()
  1381  
  1382  		switch {
  1383  		case as && bs:
  1384  			NeC128(at, bt, rt)
  1385  		case as && !bs:
  1386  			NeSVC128(at[0], bt, rt)
  1387  		case !as && bs:
  1388  			NeVSC128(at, bt[0], rt)
  1389  		default:
  1390  			NeC128(at, bt, rt)
  1391  		}
  1392  		return
  1393  	case String:
  1394  		at := a.Strings()
  1395  		bt := b.Strings()
  1396  
  1397  		switch {
  1398  		case as && bs:
  1399  			NeStr(at, bt, rt)
  1400  		case as && !bs:
  1401  			NeSVStr(at[0], bt, rt)
  1402  		case !as && bs:
  1403  			NeVSStr(at, bt[0], rt)
  1404  		default:
  1405  			NeStr(at, bt, rt)
  1406  		}
  1407  		return
  1408  	case UnsafePointer:
  1409  		at := a.UnsafePointers()
  1410  		bt := b.UnsafePointers()
  1411  
  1412  		switch {
  1413  		case as && bs:
  1414  			NeUnsafePointer(at, bt, rt)
  1415  		case as && !bs:
  1416  			NeSVUnsafePointer(at[0], bt, rt)
  1417  		case !as && bs:
  1418  			NeVSUnsafePointer(at, bt[0], rt)
  1419  		default:
  1420  			NeUnsafePointer(at, bt, rt)
  1421  		}
  1422  		return
  1423  	default:
  1424  		return errors.Errorf("Unsupported type %v for Ne", t)
  1425  	}
  1426  }
  1427  
  1428  func (e E) GtSame(t reflect.Type, a *storage.Header, b *storage.Header) (err error) {
  1429  	as := isScalar(a, t)
  1430  	bs := isScalar(b, t)
  1431  
  1432  	switch t {
  1433  	case Int:
  1434  		at := a.Ints()
  1435  		bt := b.Ints()
  1436  		switch {
  1437  		case as && bs:
  1438  			GtSameI(at, bt)
  1439  		case as && !bs:
  1440  			GtSameSVI(at[0], bt)
  1441  		case !as && bs:
  1442  			GtSameVSI(at, bt[0])
  1443  		default:
  1444  			GtSameI(at, bt)
  1445  		}
  1446  		return
  1447  	case Int8:
  1448  		at := a.Int8s()
  1449  		bt := b.Int8s()
  1450  		switch {
  1451  		case as && bs:
  1452  			GtSameI8(at, bt)
  1453  		case as && !bs:
  1454  			GtSameSVI8(at[0], bt)
  1455  		case !as && bs:
  1456  			GtSameVSI8(at, bt[0])
  1457  		default:
  1458  			GtSameI8(at, bt)
  1459  		}
  1460  		return
  1461  	case Int16:
  1462  		at := a.Int16s()
  1463  		bt := b.Int16s()
  1464  		switch {
  1465  		case as && bs:
  1466  			GtSameI16(at, bt)
  1467  		case as && !bs:
  1468  			GtSameSVI16(at[0], bt)
  1469  		case !as && bs:
  1470  			GtSameVSI16(at, bt[0])
  1471  		default:
  1472  			GtSameI16(at, bt)
  1473  		}
  1474  		return
  1475  	case Int32:
  1476  		at := a.Int32s()
  1477  		bt := b.Int32s()
  1478  		switch {
  1479  		case as && bs:
  1480  			GtSameI32(at, bt)
  1481  		case as && !bs:
  1482  			GtSameSVI32(at[0], bt)
  1483  		case !as && bs:
  1484  			GtSameVSI32(at, bt[0])
  1485  		default:
  1486  			GtSameI32(at, bt)
  1487  		}
  1488  		return
  1489  	case Int64:
  1490  		at := a.Int64s()
  1491  		bt := b.Int64s()
  1492  		switch {
  1493  		case as && bs:
  1494  			GtSameI64(at, bt)
  1495  		case as && !bs:
  1496  			GtSameSVI64(at[0], bt)
  1497  		case !as && bs:
  1498  			GtSameVSI64(at, bt[0])
  1499  		default:
  1500  			GtSameI64(at, bt)
  1501  		}
  1502  		return
  1503  	case Uint:
  1504  		at := a.Uints()
  1505  		bt := b.Uints()
  1506  		switch {
  1507  		case as && bs:
  1508  			GtSameU(at, bt)
  1509  		case as && !bs:
  1510  			GtSameSVU(at[0], bt)
  1511  		case !as && bs:
  1512  			GtSameVSU(at, bt[0])
  1513  		default:
  1514  			GtSameU(at, bt)
  1515  		}
  1516  		return
  1517  	case Uint8:
  1518  		at := a.Uint8s()
  1519  		bt := b.Uint8s()
  1520  		switch {
  1521  		case as && bs:
  1522  			GtSameU8(at, bt)
  1523  		case as && !bs:
  1524  			GtSameSVU8(at[0], bt)
  1525  		case !as && bs:
  1526  			GtSameVSU8(at, bt[0])
  1527  		default:
  1528  			GtSameU8(at, bt)
  1529  		}
  1530  		return
  1531  	case Uint16:
  1532  		at := a.Uint16s()
  1533  		bt := b.Uint16s()
  1534  		switch {
  1535  		case as && bs:
  1536  			GtSameU16(at, bt)
  1537  		case as && !bs:
  1538  			GtSameSVU16(at[0], bt)
  1539  		case !as && bs:
  1540  			GtSameVSU16(at, bt[0])
  1541  		default:
  1542  			GtSameU16(at, bt)
  1543  		}
  1544  		return
  1545  	case Uint32:
  1546  		at := a.Uint32s()
  1547  		bt := b.Uint32s()
  1548  		switch {
  1549  		case as && bs:
  1550  			GtSameU32(at, bt)
  1551  		case as && !bs:
  1552  			GtSameSVU32(at[0], bt)
  1553  		case !as && bs:
  1554  			GtSameVSU32(at, bt[0])
  1555  		default:
  1556  			GtSameU32(at, bt)
  1557  		}
  1558  		return
  1559  	case Uint64:
  1560  		at := a.Uint64s()
  1561  		bt := b.Uint64s()
  1562  		switch {
  1563  		case as && bs:
  1564  			GtSameU64(at, bt)
  1565  		case as && !bs:
  1566  			GtSameSVU64(at[0], bt)
  1567  		case !as && bs:
  1568  			GtSameVSU64(at, bt[0])
  1569  		default:
  1570  			GtSameU64(at, bt)
  1571  		}
  1572  		return
  1573  	case Float32:
  1574  		at := a.Float32s()
  1575  		bt := b.Float32s()
  1576  		switch {
  1577  		case as && bs:
  1578  			GtSameF32(at, bt)
  1579  		case as && !bs:
  1580  			GtSameSVF32(at[0], bt)
  1581  		case !as && bs:
  1582  			GtSameVSF32(at, bt[0])
  1583  		default:
  1584  			GtSameF32(at, bt)
  1585  		}
  1586  		return
  1587  	case Float64:
  1588  		at := a.Float64s()
  1589  		bt := b.Float64s()
  1590  		switch {
  1591  		case as && bs:
  1592  			GtSameF64(at, bt)
  1593  		case as && !bs:
  1594  			GtSameSVF64(at[0], bt)
  1595  		case !as && bs:
  1596  			GtSameVSF64(at, bt[0])
  1597  		default:
  1598  			GtSameF64(at, bt)
  1599  		}
  1600  		return
  1601  	case String:
  1602  		at := a.Strings()
  1603  		bt := b.Strings()
  1604  		switch {
  1605  		case as && bs:
  1606  			GtSameStr(at, bt)
  1607  		case as && !bs:
  1608  			GtSameSVStr(at[0], bt)
  1609  		case !as && bs:
  1610  			GtSameVSStr(at, bt[0])
  1611  		default:
  1612  			GtSameStr(at, bt)
  1613  		}
  1614  		return
  1615  	default:
  1616  		return errors.Errorf("Unsupported type %v for Gt", t)
  1617  	}
  1618  }
  1619  
  1620  func (e E) GteSame(t reflect.Type, a *storage.Header, b *storage.Header) (err error) {
  1621  	as := isScalar(a, t)
  1622  	bs := isScalar(b, t)
  1623  
  1624  	switch t {
  1625  	case Int:
  1626  		at := a.Ints()
  1627  		bt := b.Ints()
  1628  		switch {
  1629  		case as && bs:
  1630  			GteSameI(at, bt)
  1631  		case as && !bs:
  1632  			GteSameSVI(at[0], bt)
  1633  		case !as && bs:
  1634  			GteSameVSI(at, bt[0])
  1635  		default:
  1636  			GteSameI(at, bt)
  1637  		}
  1638  		return
  1639  	case Int8:
  1640  		at := a.Int8s()
  1641  		bt := b.Int8s()
  1642  		switch {
  1643  		case as && bs:
  1644  			GteSameI8(at, bt)
  1645  		case as && !bs:
  1646  			GteSameSVI8(at[0], bt)
  1647  		case !as && bs:
  1648  			GteSameVSI8(at, bt[0])
  1649  		default:
  1650  			GteSameI8(at, bt)
  1651  		}
  1652  		return
  1653  	case Int16:
  1654  		at := a.Int16s()
  1655  		bt := b.Int16s()
  1656  		switch {
  1657  		case as && bs:
  1658  			GteSameI16(at, bt)
  1659  		case as && !bs:
  1660  			GteSameSVI16(at[0], bt)
  1661  		case !as && bs:
  1662  			GteSameVSI16(at, bt[0])
  1663  		default:
  1664  			GteSameI16(at, bt)
  1665  		}
  1666  		return
  1667  	case Int32:
  1668  		at := a.Int32s()
  1669  		bt := b.Int32s()
  1670  		switch {
  1671  		case as && bs:
  1672  			GteSameI32(at, bt)
  1673  		case as && !bs:
  1674  			GteSameSVI32(at[0], bt)
  1675  		case !as && bs:
  1676  			GteSameVSI32(at, bt[0])
  1677  		default:
  1678  			GteSameI32(at, bt)
  1679  		}
  1680  		return
  1681  	case Int64:
  1682  		at := a.Int64s()
  1683  		bt := b.Int64s()
  1684  		switch {
  1685  		case as && bs:
  1686  			GteSameI64(at, bt)
  1687  		case as && !bs:
  1688  			GteSameSVI64(at[0], bt)
  1689  		case !as && bs:
  1690  			GteSameVSI64(at, bt[0])
  1691  		default:
  1692  			GteSameI64(at, bt)
  1693  		}
  1694  		return
  1695  	case Uint:
  1696  		at := a.Uints()
  1697  		bt := b.Uints()
  1698  		switch {
  1699  		case as && bs:
  1700  			GteSameU(at, bt)
  1701  		case as && !bs:
  1702  			GteSameSVU(at[0], bt)
  1703  		case !as && bs:
  1704  			GteSameVSU(at, bt[0])
  1705  		default:
  1706  			GteSameU(at, bt)
  1707  		}
  1708  		return
  1709  	case Uint8:
  1710  		at := a.Uint8s()
  1711  		bt := b.Uint8s()
  1712  		switch {
  1713  		case as && bs:
  1714  			GteSameU8(at, bt)
  1715  		case as && !bs:
  1716  			GteSameSVU8(at[0], bt)
  1717  		case !as && bs:
  1718  			GteSameVSU8(at, bt[0])
  1719  		default:
  1720  			GteSameU8(at, bt)
  1721  		}
  1722  		return
  1723  	case Uint16:
  1724  		at := a.Uint16s()
  1725  		bt := b.Uint16s()
  1726  		switch {
  1727  		case as && bs:
  1728  			GteSameU16(at, bt)
  1729  		case as && !bs:
  1730  			GteSameSVU16(at[0], bt)
  1731  		case !as && bs:
  1732  			GteSameVSU16(at, bt[0])
  1733  		default:
  1734  			GteSameU16(at, bt)
  1735  		}
  1736  		return
  1737  	case Uint32:
  1738  		at := a.Uint32s()
  1739  		bt := b.Uint32s()
  1740  		switch {
  1741  		case as && bs:
  1742  			GteSameU32(at, bt)
  1743  		case as && !bs:
  1744  			GteSameSVU32(at[0], bt)
  1745  		case !as && bs:
  1746  			GteSameVSU32(at, bt[0])
  1747  		default:
  1748  			GteSameU32(at, bt)
  1749  		}
  1750  		return
  1751  	case Uint64:
  1752  		at := a.Uint64s()
  1753  		bt := b.Uint64s()
  1754  		switch {
  1755  		case as && bs:
  1756  			GteSameU64(at, bt)
  1757  		case as && !bs:
  1758  			GteSameSVU64(at[0], bt)
  1759  		case !as && bs:
  1760  			GteSameVSU64(at, bt[0])
  1761  		default:
  1762  			GteSameU64(at, bt)
  1763  		}
  1764  		return
  1765  	case Float32:
  1766  		at := a.Float32s()
  1767  		bt := b.Float32s()
  1768  		switch {
  1769  		case as && bs:
  1770  			GteSameF32(at, bt)
  1771  		case as && !bs:
  1772  			GteSameSVF32(at[0], bt)
  1773  		case !as && bs:
  1774  			GteSameVSF32(at, bt[0])
  1775  		default:
  1776  			GteSameF32(at, bt)
  1777  		}
  1778  		return
  1779  	case Float64:
  1780  		at := a.Float64s()
  1781  		bt := b.Float64s()
  1782  		switch {
  1783  		case as && bs:
  1784  			GteSameF64(at, bt)
  1785  		case as && !bs:
  1786  			GteSameSVF64(at[0], bt)
  1787  		case !as && bs:
  1788  			GteSameVSF64(at, bt[0])
  1789  		default:
  1790  			GteSameF64(at, bt)
  1791  		}
  1792  		return
  1793  	case String:
  1794  		at := a.Strings()
  1795  		bt := b.Strings()
  1796  		switch {
  1797  		case as && bs:
  1798  			GteSameStr(at, bt)
  1799  		case as && !bs:
  1800  			GteSameSVStr(at[0], bt)
  1801  		case !as && bs:
  1802  			GteSameVSStr(at, bt[0])
  1803  		default:
  1804  			GteSameStr(at, bt)
  1805  		}
  1806  		return
  1807  	default:
  1808  		return errors.Errorf("Unsupported type %v for Gte", t)
  1809  	}
  1810  }
  1811  
  1812  func (e E) LtSame(t reflect.Type, a *storage.Header, b *storage.Header) (err error) {
  1813  	as := isScalar(a, t)
  1814  	bs := isScalar(b, t)
  1815  
  1816  	switch t {
  1817  	case Int:
  1818  		at := a.Ints()
  1819  		bt := b.Ints()
  1820  		switch {
  1821  		case as && bs:
  1822  			LtSameI(at, bt)
  1823  		case as && !bs:
  1824  			LtSameSVI(at[0], bt)
  1825  		case !as && bs:
  1826  			LtSameVSI(at, bt[0])
  1827  		default:
  1828  			LtSameI(at, bt)
  1829  		}
  1830  		return
  1831  	case Int8:
  1832  		at := a.Int8s()
  1833  		bt := b.Int8s()
  1834  		switch {
  1835  		case as && bs:
  1836  			LtSameI8(at, bt)
  1837  		case as && !bs:
  1838  			LtSameSVI8(at[0], bt)
  1839  		case !as && bs:
  1840  			LtSameVSI8(at, bt[0])
  1841  		default:
  1842  			LtSameI8(at, bt)
  1843  		}
  1844  		return
  1845  	case Int16:
  1846  		at := a.Int16s()
  1847  		bt := b.Int16s()
  1848  		switch {
  1849  		case as && bs:
  1850  			LtSameI16(at, bt)
  1851  		case as && !bs:
  1852  			LtSameSVI16(at[0], bt)
  1853  		case !as && bs:
  1854  			LtSameVSI16(at, bt[0])
  1855  		default:
  1856  			LtSameI16(at, bt)
  1857  		}
  1858  		return
  1859  	case Int32:
  1860  		at := a.Int32s()
  1861  		bt := b.Int32s()
  1862  		switch {
  1863  		case as && bs:
  1864  			LtSameI32(at, bt)
  1865  		case as && !bs:
  1866  			LtSameSVI32(at[0], bt)
  1867  		case !as && bs:
  1868  			LtSameVSI32(at, bt[0])
  1869  		default:
  1870  			LtSameI32(at, bt)
  1871  		}
  1872  		return
  1873  	case Int64:
  1874  		at := a.Int64s()
  1875  		bt := b.Int64s()
  1876  		switch {
  1877  		case as && bs:
  1878  			LtSameI64(at, bt)
  1879  		case as && !bs:
  1880  			LtSameSVI64(at[0], bt)
  1881  		case !as && bs:
  1882  			LtSameVSI64(at, bt[0])
  1883  		default:
  1884  			LtSameI64(at, bt)
  1885  		}
  1886  		return
  1887  	case Uint:
  1888  		at := a.Uints()
  1889  		bt := b.Uints()
  1890  		switch {
  1891  		case as && bs:
  1892  			LtSameU(at, bt)
  1893  		case as && !bs:
  1894  			LtSameSVU(at[0], bt)
  1895  		case !as && bs:
  1896  			LtSameVSU(at, bt[0])
  1897  		default:
  1898  			LtSameU(at, bt)
  1899  		}
  1900  		return
  1901  	case Uint8:
  1902  		at := a.Uint8s()
  1903  		bt := b.Uint8s()
  1904  		switch {
  1905  		case as && bs:
  1906  			LtSameU8(at, bt)
  1907  		case as && !bs:
  1908  			LtSameSVU8(at[0], bt)
  1909  		case !as && bs:
  1910  			LtSameVSU8(at, bt[0])
  1911  		default:
  1912  			LtSameU8(at, bt)
  1913  		}
  1914  		return
  1915  	case Uint16:
  1916  		at := a.Uint16s()
  1917  		bt := b.Uint16s()
  1918  		switch {
  1919  		case as && bs:
  1920  			LtSameU16(at, bt)
  1921  		case as && !bs:
  1922  			LtSameSVU16(at[0], bt)
  1923  		case !as && bs:
  1924  			LtSameVSU16(at, bt[0])
  1925  		default:
  1926  			LtSameU16(at, bt)
  1927  		}
  1928  		return
  1929  	case Uint32:
  1930  		at := a.Uint32s()
  1931  		bt := b.Uint32s()
  1932  		switch {
  1933  		case as && bs:
  1934  			LtSameU32(at, bt)
  1935  		case as && !bs:
  1936  			LtSameSVU32(at[0], bt)
  1937  		case !as && bs:
  1938  			LtSameVSU32(at, bt[0])
  1939  		default:
  1940  			LtSameU32(at, bt)
  1941  		}
  1942  		return
  1943  	case Uint64:
  1944  		at := a.Uint64s()
  1945  		bt := b.Uint64s()
  1946  		switch {
  1947  		case as && bs:
  1948  			LtSameU64(at, bt)
  1949  		case as && !bs:
  1950  			LtSameSVU64(at[0], bt)
  1951  		case !as && bs:
  1952  			LtSameVSU64(at, bt[0])
  1953  		default:
  1954  			LtSameU64(at, bt)
  1955  		}
  1956  		return
  1957  	case Float32:
  1958  		at := a.Float32s()
  1959  		bt := b.Float32s()
  1960  		switch {
  1961  		case as && bs:
  1962  			LtSameF32(at, bt)
  1963  		case as && !bs:
  1964  			LtSameSVF32(at[0], bt)
  1965  		case !as && bs:
  1966  			LtSameVSF32(at, bt[0])
  1967  		default:
  1968  			LtSameF32(at, bt)
  1969  		}
  1970  		return
  1971  	case Float64:
  1972  		at := a.Float64s()
  1973  		bt := b.Float64s()
  1974  		switch {
  1975  		case as && bs:
  1976  			LtSameF64(at, bt)
  1977  		case as && !bs:
  1978  			LtSameSVF64(at[0], bt)
  1979  		case !as && bs:
  1980  			LtSameVSF64(at, bt[0])
  1981  		default:
  1982  			LtSameF64(at, bt)
  1983  		}
  1984  		return
  1985  	case String:
  1986  		at := a.Strings()
  1987  		bt := b.Strings()
  1988  		switch {
  1989  		case as && bs:
  1990  			LtSameStr(at, bt)
  1991  		case as && !bs:
  1992  			LtSameSVStr(at[0], bt)
  1993  		case !as && bs:
  1994  			LtSameVSStr(at, bt[0])
  1995  		default:
  1996  			LtSameStr(at, bt)
  1997  		}
  1998  		return
  1999  	default:
  2000  		return errors.Errorf("Unsupported type %v for Lt", t)
  2001  	}
  2002  }
  2003  
  2004  func (e E) LteSame(t reflect.Type, a *storage.Header, b *storage.Header) (err error) {
  2005  	as := isScalar(a, t)
  2006  	bs := isScalar(b, t)
  2007  
  2008  	switch t {
  2009  	case Int:
  2010  		at := a.Ints()
  2011  		bt := b.Ints()
  2012  		switch {
  2013  		case as && bs:
  2014  			LteSameI(at, bt)
  2015  		case as && !bs:
  2016  			LteSameSVI(at[0], bt)
  2017  		case !as && bs:
  2018  			LteSameVSI(at, bt[0])
  2019  		default:
  2020  			LteSameI(at, bt)
  2021  		}
  2022  		return
  2023  	case Int8:
  2024  		at := a.Int8s()
  2025  		bt := b.Int8s()
  2026  		switch {
  2027  		case as && bs:
  2028  			LteSameI8(at, bt)
  2029  		case as && !bs:
  2030  			LteSameSVI8(at[0], bt)
  2031  		case !as && bs:
  2032  			LteSameVSI8(at, bt[0])
  2033  		default:
  2034  			LteSameI8(at, bt)
  2035  		}
  2036  		return
  2037  	case Int16:
  2038  		at := a.Int16s()
  2039  		bt := b.Int16s()
  2040  		switch {
  2041  		case as && bs:
  2042  			LteSameI16(at, bt)
  2043  		case as && !bs:
  2044  			LteSameSVI16(at[0], bt)
  2045  		case !as && bs:
  2046  			LteSameVSI16(at, bt[0])
  2047  		default:
  2048  			LteSameI16(at, bt)
  2049  		}
  2050  		return
  2051  	case Int32:
  2052  		at := a.Int32s()
  2053  		bt := b.Int32s()
  2054  		switch {
  2055  		case as && bs:
  2056  			LteSameI32(at, bt)
  2057  		case as && !bs:
  2058  			LteSameSVI32(at[0], bt)
  2059  		case !as && bs:
  2060  			LteSameVSI32(at, bt[0])
  2061  		default:
  2062  			LteSameI32(at, bt)
  2063  		}
  2064  		return
  2065  	case Int64:
  2066  		at := a.Int64s()
  2067  		bt := b.Int64s()
  2068  		switch {
  2069  		case as && bs:
  2070  			LteSameI64(at, bt)
  2071  		case as && !bs:
  2072  			LteSameSVI64(at[0], bt)
  2073  		case !as && bs:
  2074  			LteSameVSI64(at, bt[0])
  2075  		default:
  2076  			LteSameI64(at, bt)
  2077  		}
  2078  		return
  2079  	case Uint:
  2080  		at := a.Uints()
  2081  		bt := b.Uints()
  2082  		switch {
  2083  		case as && bs:
  2084  			LteSameU(at, bt)
  2085  		case as && !bs:
  2086  			LteSameSVU(at[0], bt)
  2087  		case !as && bs:
  2088  			LteSameVSU(at, bt[0])
  2089  		default:
  2090  			LteSameU(at, bt)
  2091  		}
  2092  		return
  2093  	case Uint8:
  2094  		at := a.Uint8s()
  2095  		bt := b.Uint8s()
  2096  		switch {
  2097  		case as && bs:
  2098  			LteSameU8(at, bt)
  2099  		case as && !bs:
  2100  			LteSameSVU8(at[0], bt)
  2101  		case !as && bs:
  2102  			LteSameVSU8(at, bt[0])
  2103  		default:
  2104  			LteSameU8(at, bt)
  2105  		}
  2106  		return
  2107  	case Uint16:
  2108  		at := a.Uint16s()
  2109  		bt := b.Uint16s()
  2110  		switch {
  2111  		case as && bs:
  2112  			LteSameU16(at, bt)
  2113  		case as && !bs:
  2114  			LteSameSVU16(at[0], bt)
  2115  		case !as && bs:
  2116  			LteSameVSU16(at, bt[0])
  2117  		default:
  2118  			LteSameU16(at, bt)
  2119  		}
  2120  		return
  2121  	case Uint32:
  2122  		at := a.Uint32s()
  2123  		bt := b.Uint32s()
  2124  		switch {
  2125  		case as && bs:
  2126  			LteSameU32(at, bt)
  2127  		case as && !bs:
  2128  			LteSameSVU32(at[0], bt)
  2129  		case !as && bs:
  2130  			LteSameVSU32(at, bt[0])
  2131  		default:
  2132  			LteSameU32(at, bt)
  2133  		}
  2134  		return
  2135  	case Uint64:
  2136  		at := a.Uint64s()
  2137  		bt := b.Uint64s()
  2138  		switch {
  2139  		case as && bs:
  2140  			LteSameU64(at, bt)
  2141  		case as && !bs:
  2142  			LteSameSVU64(at[0], bt)
  2143  		case !as && bs:
  2144  			LteSameVSU64(at, bt[0])
  2145  		default:
  2146  			LteSameU64(at, bt)
  2147  		}
  2148  		return
  2149  	case Float32:
  2150  		at := a.Float32s()
  2151  		bt := b.Float32s()
  2152  		switch {
  2153  		case as && bs:
  2154  			LteSameF32(at, bt)
  2155  		case as && !bs:
  2156  			LteSameSVF32(at[0], bt)
  2157  		case !as && bs:
  2158  			LteSameVSF32(at, bt[0])
  2159  		default:
  2160  			LteSameF32(at, bt)
  2161  		}
  2162  		return
  2163  	case Float64:
  2164  		at := a.Float64s()
  2165  		bt := b.Float64s()
  2166  		switch {
  2167  		case as && bs:
  2168  			LteSameF64(at, bt)
  2169  		case as && !bs:
  2170  			LteSameSVF64(at[0], bt)
  2171  		case !as && bs:
  2172  			LteSameVSF64(at, bt[0])
  2173  		default:
  2174  			LteSameF64(at, bt)
  2175  		}
  2176  		return
  2177  	case String:
  2178  		at := a.Strings()
  2179  		bt := b.Strings()
  2180  		switch {
  2181  		case as && bs:
  2182  			LteSameStr(at, bt)
  2183  		case as && !bs:
  2184  			LteSameSVStr(at[0], bt)
  2185  		case !as && bs:
  2186  			LteSameVSStr(at, bt[0])
  2187  		default:
  2188  			LteSameStr(at, bt)
  2189  		}
  2190  		return
  2191  	default:
  2192  		return errors.Errorf("Unsupported type %v for Lte", t)
  2193  	}
  2194  }
  2195  
  2196  func (e E) EqSame(t reflect.Type, a *storage.Header, b *storage.Header) (err error) {
  2197  	as := isScalar(a, t)
  2198  	bs := isScalar(b, t)
  2199  
  2200  	switch t {
  2201  	case Bool:
  2202  		at := a.Bools()
  2203  		bt := b.Bools()
  2204  		switch {
  2205  		case as && bs:
  2206  			EqSameB(at, bt)
  2207  		case as && !bs:
  2208  			EqSameSVB(at[0], bt)
  2209  		case !as && bs:
  2210  			EqSameVSB(at, bt[0])
  2211  		default:
  2212  			EqSameB(at, bt)
  2213  		}
  2214  		return
  2215  	case Int:
  2216  		at := a.Ints()
  2217  		bt := b.Ints()
  2218  		switch {
  2219  		case as && bs:
  2220  			EqSameI(at, bt)
  2221  		case as && !bs:
  2222  			EqSameSVI(at[0], bt)
  2223  		case !as && bs:
  2224  			EqSameVSI(at, bt[0])
  2225  		default:
  2226  			EqSameI(at, bt)
  2227  		}
  2228  		return
  2229  	case Int8:
  2230  		at := a.Int8s()
  2231  		bt := b.Int8s()
  2232  		switch {
  2233  		case as && bs:
  2234  			EqSameI8(at, bt)
  2235  		case as && !bs:
  2236  			EqSameSVI8(at[0], bt)
  2237  		case !as && bs:
  2238  			EqSameVSI8(at, bt[0])
  2239  		default:
  2240  			EqSameI8(at, bt)
  2241  		}
  2242  		return
  2243  	case Int16:
  2244  		at := a.Int16s()
  2245  		bt := b.Int16s()
  2246  		switch {
  2247  		case as && bs:
  2248  			EqSameI16(at, bt)
  2249  		case as && !bs:
  2250  			EqSameSVI16(at[0], bt)
  2251  		case !as && bs:
  2252  			EqSameVSI16(at, bt[0])
  2253  		default:
  2254  			EqSameI16(at, bt)
  2255  		}
  2256  		return
  2257  	case Int32:
  2258  		at := a.Int32s()
  2259  		bt := b.Int32s()
  2260  		switch {
  2261  		case as && bs:
  2262  			EqSameI32(at, bt)
  2263  		case as && !bs:
  2264  			EqSameSVI32(at[0], bt)
  2265  		case !as && bs:
  2266  			EqSameVSI32(at, bt[0])
  2267  		default:
  2268  			EqSameI32(at, bt)
  2269  		}
  2270  		return
  2271  	case Int64:
  2272  		at := a.Int64s()
  2273  		bt := b.Int64s()
  2274  		switch {
  2275  		case as && bs:
  2276  			EqSameI64(at, bt)
  2277  		case as && !bs:
  2278  			EqSameSVI64(at[0], bt)
  2279  		case !as && bs:
  2280  			EqSameVSI64(at, bt[0])
  2281  		default:
  2282  			EqSameI64(at, bt)
  2283  		}
  2284  		return
  2285  	case Uint:
  2286  		at := a.Uints()
  2287  		bt := b.Uints()
  2288  		switch {
  2289  		case as && bs:
  2290  			EqSameU(at, bt)
  2291  		case as && !bs:
  2292  			EqSameSVU(at[0], bt)
  2293  		case !as && bs:
  2294  			EqSameVSU(at, bt[0])
  2295  		default:
  2296  			EqSameU(at, bt)
  2297  		}
  2298  		return
  2299  	case Uint8:
  2300  		at := a.Uint8s()
  2301  		bt := b.Uint8s()
  2302  		switch {
  2303  		case as && bs:
  2304  			EqSameU8(at, bt)
  2305  		case as && !bs:
  2306  			EqSameSVU8(at[0], bt)
  2307  		case !as && bs:
  2308  			EqSameVSU8(at, bt[0])
  2309  		default:
  2310  			EqSameU8(at, bt)
  2311  		}
  2312  		return
  2313  	case Uint16:
  2314  		at := a.Uint16s()
  2315  		bt := b.Uint16s()
  2316  		switch {
  2317  		case as && bs:
  2318  			EqSameU16(at, bt)
  2319  		case as && !bs:
  2320  			EqSameSVU16(at[0], bt)
  2321  		case !as && bs:
  2322  			EqSameVSU16(at, bt[0])
  2323  		default:
  2324  			EqSameU16(at, bt)
  2325  		}
  2326  		return
  2327  	case Uint32:
  2328  		at := a.Uint32s()
  2329  		bt := b.Uint32s()
  2330  		switch {
  2331  		case as && bs:
  2332  			EqSameU32(at, bt)
  2333  		case as && !bs:
  2334  			EqSameSVU32(at[0], bt)
  2335  		case !as && bs:
  2336  			EqSameVSU32(at, bt[0])
  2337  		default:
  2338  			EqSameU32(at, bt)
  2339  		}
  2340  		return
  2341  	case Uint64:
  2342  		at := a.Uint64s()
  2343  		bt := b.Uint64s()
  2344  		switch {
  2345  		case as && bs:
  2346  			EqSameU64(at, bt)
  2347  		case as && !bs:
  2348  			EqSameSVU64(at[0], bt)
  2349  		case !as && bs:
  2350  			EqSameVSU64(at, bt[0])
  2351  		default:
  2352  			EqSameU64(at, bt)
  2353  		}
  2354  		return
  2355  	case Uintptr:
  2356  		at := a.Uintptrs()
  2357  		bt := b.Uintptrs()
  2358  		switch {
  2359  		case as && bs:
  2360  			EqSameUintptr(at, bt)
  2361  		case as && !bs:
  2362  			EqSameSVUintptr(at[0], bt)
  2363  		case !as && bs:
  2364  			EqSameVSUintptr(at, bt[0])
  2365  		default:
  2366  			EqSameUintptr(at, bt)
  2367  		}
  2368  		return
  2369  	case Float32:
  2370  		at := a.Float32s()
  2371  		bt := b.Float32s()
  2372  		switch {
  2373  		case as && bs:
  2374  			EqSameF32(at, bt)
  2375  		case as && !bs:
  2376  			EqSameSVF32(at[0], bt)
  2377  		case !as && bs:
  2378  			EqSameVSF32(at, bt[0])
  2379  		default:
  2380  			EqSameF32(at, bt)
  2381  		}
  2382  		return
  2383  	case Float64:
  2384  		at := a.Float64s()
  2385  		bt := b.Float64s()
  2386  		switch {
  2387  		case as && bs:
  2388  			EqSameF64(at, bt)
  2389  		case as && !bs:
  2390  			EqSameSVF64(at[0], bt)
  2391  		case !as && bs:
  2392  			EqSameVSF64(at, bt[0])
  2393  		default:
  2394  			EqSameF64(at, bt)
  2395  		}
  2396  		return
  2397  	case Complex64:
  2398  		at := a.Complex64s()
  2399  		bt := b.Complex64s()
  2400  		switch {
  2401  		case as && bs:
  2402  			EqSameC64(at, bt)
  2403  		case as && !bs:
  2404  			EqSameSVC64(at[0], bt)
  2405  		case !as && bs:
  2406  			EqSameVSC64(at, bt[0])
  2407  		default:
  2408  			EqSameC64(at, bt)
  2409  		}
  2410  		return
  2411  	case Complex128:
  2412  		at := a.Complex128s()
  2413  		bt := b.Complex128s()
  2414  		switch {
  2415  		case as && bs:
  2416  			EqSameC128(at, bt)
  2417  		case as && !bs:
  2418  			EqSameSVC128(at[0], bt)
  2419  		case !as && bs:
  2420  			EqSameVSC128(at, bt[0])
  2421  		default:
  2422  			EqSameC128(at, bt)
  2423  		}
  2424  		return
  2425  	case String:
  2426  		at := a.Strings()
  2427  		bt := b.Strings()
  2428  		switch {
  2429  		case as && bs:
  2430  			EqSameStr(at, bt)
  2431  		case as && !bs:
  2432  			EqSameSVStr(at[0], bt)
  2433  		case !as && bs:
  2434  			EqSameVSStr(at, bt[0])
  2435  		default:
  2436  			EqSameStr(at, bt)
  2437  		}
  2438  		return
  2439  	default:
  2440  		return errors.Errorf("Unsupported type %v for Eq", t)
  2441  	}
  2442  }
  2443  
  2444  func (e E) NeSame(t reflect.Type, a *storage.Header, b *storage.Header) (err error) {
  2445  	as := isScalar(a, t)
  2446  	bs := isScalar(b, t)
  2447  
  2448  	switch t {
  2449  	case Bool:
  2450  		at := a.Bools()
  2451  		bt := b.Bools()
  2452  		switch {
  2453  		case as && bs:
  2454  			NeSameB(at, bt)
  2455  		case as && !bs:
  2456  			NeSameSVB(at[0], bt)
  2457  		case !as && bs:
  2458  			NeSameVSB(at, bt[0])
  2459  		default:
  2460  			NeSameB(at, bt)
  2461  		}
  2462  		return
  2463  	case Int:
  2464  		at := a.Ints()
  2465  		bt := b.Ints()
  2466  		switch {
  2467  		case as && bs:
  2468  			NeSameI(at, bt)
  2469  		case as && !bs:
  2470  			NeSameSVI(at[0], bt)
  2471  		case !as && bs:
  2472  			NeSameVSI(at, bt[0])
  2473  		default:
  2474  			NeSameI(at, bt)
  2475  		}
  2476  		return
  2477  	case Int8:
  2478  		at := a.Int8s()
  2479  		bt := b.Int8s()
  2480  		switch {
  2481  		case as && bs:
  2482  			NeSameI8(at, bt)
  2483  		case as && !bs:
  2484  			NeSameSVI8(at[0], bt)
  2485  		case !as && bs:
  2486  			NeSameVSI8(at, bt[0])
  2487  		default:
  2488  			NeSameI8(at, bt)
  2489  		}
  2490  		return
  2491  	case Int16:
  2492  		at := a.Int16s()
  2493  		bt := b.Int16s()
  2494  		switch {
  2495  		case as && bs:
  2496  			NeSameI16(at, bt)
  2497  		case as && !bs:
  2498  			NeSameSVI16(at[0], bt)
  2499  		case !as && bs:
  2500  			NeSameVSI16(at, bt[0])
  2501  		default:
  2502  			NeSameI16(at, bt)
  2503  		}
  2504  		return
  2505  	case Int32:
  2506  		at := a.Int32s()
  2507  		bt := b.Int32s()
  2508  		switch {
  2509  		case as && bs:
  2510  			NeSameI32(at, bt)
  2511  		case as && !bs:
  2512  			NeSameSVI32(at[0], bt)
  2513  		case !as && bs:
  2514  			NeSameVSI32(at, bt[0])
  2515  		default:
  2516  			NeSameI32(at, bt)
  2517  		}
  2518  		return
  2519  	case Int64:
  2520  		at := a.Int64s()
  2521  		bt := b.Int64s()
  2522  		switch {
  2523  		case as && bs:
  2524  			NeSameI64(at, bt)
  2525  		case as && !bs:
  2526  			NeSameSVI64(at[0], bt)
  2527  		case !as && bs:
  2528  			NeSameVSI64(at, bt[0])
  2529  		default:
  2530  			NeSameI64(at, bt)
  2531  		}
  2532  		return
  2533  	case Uint:
  2534  		at := a.Uints()
  2535  		bt := b.Uints()
  2536  		switch {
  2537  		case as && bs:
  2538  			NeSameU(at, bt)
  2539  		case as && !bs:
  2540  			NeSameSVU(at[0], bt)
  2541  		case !as && bs:
  2542  			NeSameVSU(at, bt[0])
  2543  		default:
  2544  			NeSameU(at, bt)
  2545  		}
  2546  		return
  2547  	case Uint8:
  2548  		at := a.Uint8s()
  2549  		bt := b.Uint8s()
  2550  		switch {
  2551  		case as && bs:
  2552  			NeSameU8(at, bt)
  2553  		case as && !bs:
  2554  			NeSameSVU8(at[0], bt)
  2555  		case !as && bs:
  2556  			NeSameVSU8(at, bt[0])
  2557  		default:
  2558  			NeSameU8(at, bt)
  2559  		}
  2560  		return
  2561  	case Uint16:
  2562  		at := a.Uint16s()
  2563  		bt := b.Uint16s()
  2564  		switch {
  2565  		case as && bs:
  2566  			NeSameU16(at, bt)
  2567  		case as && !bs:
  2568  			NeSameSVU16(at[0], bt)
  2569  		case !as && bs:
  2570  			NeSameVSU16(at, bt[0])
  2571  		default:
  2572  			NeSameU16(at, bt)
  2573  		}
  2574  		return
  2575  	case Uint32:
  2576  		at := a.Uint32s()
  2577  		bt := b.Uint32s()
  2578  		switch {
  2579  		case as && bs:
  2580  			NeSameU32(at, bt)
  2581  		case as && !bs:
  2582  			NeSameSVU32(at[0], bt)
  2583  		case !as && bs:
  2584  			NeSameVSU32(at, bt[0])
  2585  		default:
  2586  			NeSameU32(at, bt)
  2587  		}
  2588  		return
  2589  	case Uint64:
  2590  		at := a.Uint64s()
  2591  		bt := b.Uint64s()
  2592  		switch {
  2593  		case as && bs:
  2594  			NeSameU64(at, bt)
  2595  		case as && !bs:
  2596  			NeSameSVU64(at[0], bt)
  2597  		case !as && bs:
  2598  			NeSameVSU64(at, bt[0])
  2599  		default:
  2600  			NeSameU64(at, bt)
  2601  		}
  2602  		return
  2603  	case Uintptr:
  2604  		at := a.Uintptrs()
  2605  		bt := b.Uintptrs()
  2606  		switch {
  2607  		case as && bs:
  2608  			NeSameUintptr(at, bt)
  2609  		case as && !bs:
  2610  			NeSameSVUintptr(at[0], bt)
  2611  		case !as && bs:
  2612  			NeSameVSUintptr(at, bt[0])
  2613  		default:
  2614  			NeSameUintptr(at, bt)
  2615  		}
  2616  		return
  2617  	case Float32:
  2618  		at := a.Float32s()
  2619  		bt := b.Float32s()
  2620  		switch {
  2621  		case as && bs:
  2622  			NeSameF32(at, bt)
  2623  		case as && !bs:
  2624  			NeSameSVF32(at[0], bt)
  2625  		case !as && bs:
  2626  			NeSameVSF32(at, bt[0])
  2627  		default:
  2628  			NeSameF32(at, bt)
  2629  		}
  2630  		return
  2631  	case Float64:
  2632  		at := a.Float64s()
  2633  		bt := b.Float64s()
  2634  		switch {
  2635  		case as && bs:
  2636  			NeSameF64(at, bt)
  2637  		case as && !bs:
  2638  			NeSameSVF64(at[0], bt)
  2639  		case !as && bs:
  2640  			NeSameVSF64(at, bt[0])
  2641  		default:
  2642  			NeSameF64(at, bt)
  2643  		}
  2644  		return
  2645  	case Complex64:
  2646  		at := a.Complex64s()
  2647  		bt := b.Complex64s()
  2648  		switch {
  2649  		case as && bs:
  2650  			NeSameC64(at, bt)
  2651  		case as && !bs:
  2652  			NeSameSVC64(at[0], bt)
  2653  		case !as && bs:
  2654  			NeSameVSC64(at, bt[0])
  2655  		default:
  2656  			NeSameC64(at, bt)
  2657  		}
  2658  		return
  2659  	case Complex128:
  2660  		at := a.Complex128s()
  2661  		bt := b.Complex128s()
  2662  		switch {
  2663  		case as && bs:
  2664  			NeSameC128(at, bt)
  2665  		case as && !bs:
  2666  			NeSameSVC128(at[0], bt)
  2667  		case !as && bs:
  2668  			NeSameVSC128(at, bt[0])
  2669  		default:
  2670  			NeSameC128(at, bt)
  2671  		}
  2672  		return
  2673  	case String:
  2674  		at := a.Strings()
  2675  		bt := b.Strings()
  2676  		switch {
  2677  		case as && bs:
  2678  			NeSameStr(at, bt)
  2679  		case as && !bs:
  2680  			NeSameSVStr(at[0], bt)
  2681  		case !as && bs:
  2682  			NeSameVSStr(at, bt[0])
  2683  		default:
  2684  			NeSameStr(at, bt)
  2685  		}
  2686  		return
  2687  	default:
  2688  		return errors.Errorf("Unsupported type %v for Ne", t)
  2689  	}
  2690  }
  2691  
  2692  func (e E) GtIter(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header, ait Iterator, bit Iterator, rit Iterator) (err error) {
  2693  	as := isScalar(a, t)
  2694  	bs := isScalar(b, t)
  2695  	rs := isScalar(retVal, Bool)
  2696  	rt := retVal.Bools()
  2697  
  2698  	if ((as && !bs) || (bs && !as)) && rs {
  2699  		return errors.Errorf("retVal is scalar while len(a): %d, len(b) %d", a.TypedLen(t), b.TypedLen(t))
  2700  	}
  2701  
  2702  	switch t {
  2703  	case Int:
  2704  		at := a.Ints()
  2705  		bt := b.Ints()
  2706  		switch {
  2707  		case as && bs:
  2708  			GtI(at, bt, rt)
  2709  			return
  2710  		case as && !bs:
  2711  			return GtIterSVI(at[0], bt, rt, bit, rit)
  2712  		case !as && bs:
  2713  			return GtIterVSI(at, bt[0], rt, ait, rit)
  2714  		default:
  2715  			return GtIterI(at, bt, rt, ait, bit, rit)
  2716  		}
  2717  	case Int8:
  2718  		at := a.Int8s()
  2719  		bt := b.Int8s()
  2720  		switch {
  2721  		case as && bs:
  2722  			GtI8(at, bt, rt)
  2723  			return
  2724  		case as && !bs:
  2725  			return GtIterSVI8(at[0], bt, rt, bit, rit)
  2726  		case !as && bs:
  2727  			return GtIterVSI8(at, bt[0], rt, ait, rit)
  2728  		default:
  2729  			return GtIterI8(at, bt, rt, ait, bit, rit)
  2730  		}
  2731  	case Int16:
  2732  		at := a.Int16s()
  2733  		bt := b.Int16s()
  2734  		switch {
  2735  		case as && bs:
  2736  			GtI16(at, bt, rt)
  2737  			return
  2738  		case as && !bs:
  2739  			return GtIterSVI16(at[0], bt, rt, bit, rit)
  2740  		case !as && bs:
  2741  			return GtIterVSI16(at, bt[0], rt, ait, rit)
  2742  		default:
  2743  			return GtIterI16(at, bt, rt, ait, bit, rit)
  2744  		}
  2745  	case Int32:
  2746  		at := a.Int32s()
  2747  		bt := b.Int32s()
  2748  		switch {
  2749  		case as && bs:
  2750  			GtI32(at, bt, rt)
  2751  			return
  2752  		case as && !bs:
  2753  			return GtIterSVI32(at[0], bt, rt, bit, rit)
  2754  		case !as && bs:
  2755  			return GtIterVSI32(at, bt[0], rt, ait, rit)
  2756  		default:
  2757  			return GtIterI32(at, bt, rt, ait, bit, rit)
  2758  		}
  2759  	case Int64:
  2760  		at := a.Int64s()
  2761  		bt := b.Int64s()
  2762  		switch {
  2763  		case as && bs:
  2764  			GtI64(at, bt, rt)
  2765  			return
  2766  		case as && !bs:
  2767  			return GtIterSVI64(at[0], bt, rt, bit, rit)
  2768  		case !as && bs:
  2769  			return GtIterVSI64(at, bt[0], rt, ait, rit)
  2770  		default:
  2771  			return GtIterI64(at, bt, rt, ait, bit, rit)
  2772  		}
  2773  	case Uint:
  2774  		at := a.Uints()
  2775  		bt := b.Uints()
  2776  		switch {
  2777  		case as && bs:
  2778  			GtU(at, bt, rt)
  2779  			return
  2780  		case as && !bs:
  2781  			return GtIterSVU(at[0], bt, rt, bit, rit)
  2782  		case !as && bs:
  2783  			return GtIterVSU(at, bt[0], rt, ait, rit)
  2784  		default:
  2785  			return GtIterU(at, bt, rt, ait, bit, rit)
  2786  		}
  2787  	case Uint8:
  2788  		at := a.Uint8s()
  2789  		bt := b.Uint8s()
  2790  		switch {
  2791  		case as && bs:
  2792  			GtU8(at, bt, rt)
  2793  			return
  2794  		case as && !bs:
  2795  			return GtIterSVU8(at[0], bt, rt, bit, rit)
  2796  		case !as && bs:
  2797  			return GtIterVSU8(at, bt[0], rt, ait, rit)
  2798  		default:
  2799  			return GtIterU8(at, bt, rt, ait, bit, rit)
  2800  		}
  2801  	case Uint16:
  2802  		at := a.Uint16s()
  2803  		bt := b.Uint16s()
  2804  		switch {
  2805  		case as && bs:
  2806  			GtU16(at, bt, rt)
  2807  			return
  2808  		case as && !bs:
  2809  			return GtIterSVU16(at[0], bt, rt, bit, rit)
  2810  		case !as && bs:
  2811  			return GtIterVSU16(at, bt[0], rt, ait, rit)
  2812  		default:
  2813  			return GtIterU16(at, bt, rt, ait, bit, rit)
  2814  		}
  2815  	case Uint32:
  2816  		at := a.Uint32s()
  2817  		bt := b.Uint32s()
  2818  		switch {
  2819  		case as && bs:
  2820  			GtU32(at, bt, rt)
  2821  			return
  2822  		case as && !bs:
  2823  			return GtIterSVU32(at[0], bt, rt, bit, rit)
  2824  		case !as && bs:
  2825  			return GtIterVSU32(at, bt[0], rt, ait, rit)
  2826  		default:
  2827  			return GtIterU32(at, bt, rt, ait, bit, rit)
  2828  		}
  2829  	case Uint64:
  2830  		at := a.Uint64s()
  2831  		bt := b.Uint64s()
  2832  		switch {
  2833  		case as && bs:
  2834  			GtU64(at, bt, rt)
  2835  			return
  2836  		case as && !bs:
  2837  			return GtIterSVU64(at[0], bt, rt, bit, rit)
  2838  		case !as && bs:
  2839  			return GtIterVSU64(at, bt[0], rt, ait, rit)
  2840  		default:
  2841  			return GtIterU64(at, bt, rt, ait, bit, rit)
  2842  		}
  2843  	case Float32:
  2844  		at := a.Float32s()
  2845  		bt := b.Float32s()
  2846  		switch {
  2847  		case as && bs:
  2848  			GtF32(at, bt, rt)
  2849  			return
  2850  		case as && !bs:
  2851  			return GtIterSVF32(at[0], bt, rt, bit, rit)
  2852  		case !as && bs:
  2853  			return GtIterVSF32(at, bt[0], rt, ait, rit)
  2854  		default:
  2855  			return GtIterF32(at, bt, rt, ait, bit, rit)
  2856  		}
  2857  	case Float64:
  2858  		at := a.Float64s()
  2859  		bt := b.Float64s()
  2860  		switch {
  2861  		case as && bs:
  2862  			GtF64(at, bt, rt)
  2863  			return
  2864  		case as && !bs:
  2865  			return GtIterSVF64(at[0], bt, rt, bit, rit)
  2866  		case !as && bs:
  2867  			return GtIterVSF64(at, bt[0], rt, ait, rit)
  2868  		default:
  2869  			return GtIterF64(at, bt, rt, ait, bit, rit)
  2870  		}
  2871  	case String:
  2872  		at := a.Strings()
  2873  		bt := b.Strings()
  2874  		switch {
  2875  		case as && bs:
  2876  			GtStr(at, bt, rt)
  2877  			return
  2878  		case as && !bs:
  2879  			return GtIterSVStr(at[0], bt, rt, bit, rit)
  2880  		case !as && bs:
  2881  			return GtIterVSStr(at, bt[0], rt, ait, rit)
  2882  		default:
  2883  			return GtIterStr(at, bt, rt, ait, bit, rit)
  2884  		}
  2885  	default:
  2886  		return errors.Errorf("Unsupported type %v for Gt", t)
  2887  	}
  2888  }
  2889  
  2890  func (e E) GteIter(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header, ait Iterator, bit Iterator, rit Iterator) (err error) {
  2891  	as := isScalar(a, t)
  2892  	bs := isScalar(b, t)
  2893  	rs := isScalar(retVal, Bool)
  2894  	rt := retVal.Bools()
  2895  
  2896  	if ((as && !bs) || (bs && !as)) && rs {
  2897  		return errors.Errorf("retVal is scalar while len(a): %d, len(b) %d", a.TypedLen(t), b.TypedLen(t))
  2898  	}
  2899  
  2900  	switch t {
  2901  	case Int:
  2902  		at := a.Ints()
  2903  		bt := b.Ints()
  2904  		switch {
  2905  		case as && bs:
  2906  			GteI(at, bt, rt)
  2907  			return
  2908  		case as && !bs:
  2909  			return GteIterSVI(at[0], bt, rt, bit, rit)
  2910  		case !as && bs:
  2911  			return GteIterVSI(at, bt[0], rt, ait, rit)
  2912  		default:
  2913  			return GteIterI(at, bt, rt, ait, bit, rit)
  2914  		}
  2915  	case Int8:
  2916  		at := a.Int8s()
  2917  		bt := b.Int8s()
  2918  		switch {
  2919  		case as && bs:
  2920  			GteI8(at, bt, rt)
  2921  			return
  2922  		case as && !bs:
  2923  			return GteIterSVI8(at[0], bt, rt, bit, rit)
  2924  		case !as && bs:
  2925  			return GteIterVSI8(at, bt[0], rt, ait, rit)
  2926  		default:
  2927  			return GteIterI8(at, bt, rt, ait, bit, rit)
  2928  		}
  2929  	case Int16:
  2930  		at := a.Int16s()
  2931  		bt := b.Int16s()
  2932  		switch {
  2933  		case as && bs:
  2934  			GteI16(at, bt, rt)
  2935  			return
  2936  		case as && !bs:
  2937  			return GteIterSVI16(at[0], bt, rt, bit, rit)
  2938  		case !as && bs:
  2939  			return GteIterVSI16(at, bt[0], rt, ait, rit)
  2940  		default:
  2941  			return GteIterI16(at, bt, rt, ait, bit, rit)
  2942  		}
  2943  	case Int32:
  2944  		at := a.Int32s()
  2945  		bt := b.Int32s()
  2946  		switch {
  2947  		case as && bs:
  2948  			GteI32(at, bt, rt)
  2949  			return
  2950  		case as && !bs:
  2951  			return GteIterSVI32(at[0], bt, rt, bit, rit)
  2952  		case !as && bs:
  2953  			return GteIterVSI32(at, bt[0], rt, ait, rit)
  2954  		default:
  2955  			return GteIterI32(at, bt, rt, ait, bit, rit)
  2956  		}
  2957  	case Int64:
  2958  		at := a.Int64s()
  2959  		bt := b.Int64s()
  2960  		switch {
  2961  		case as && bs:
  2962  			GteI64(at, bt, rt)
  2963  			return
  2964  		case as && !bs:
  2965  			return GteIterSVI64(at[0], bt, rt, bit, rit)
  2966  		case !as && bs:
  2967  			return GteIterVSI64(at, bt[0], rt, ait, rit)
  2968  		default:
  2969  			return GteIterI64(at, bt, rt, ait, bit, rit)
  2970  		}
  2971  	case Uint:
  2972  		at := a.Uints()
  2973  		bt := b.Uints()
  2974  		switch {
  2975  		case as && bs:
  2976  			GteU(at, bt, rt)
  2977  			return
  2978  		case as && !bs:
  2979  			return GteIterSVU(at[0], bt, rt, bit, rit)
  2980  		case !as && bs:
  2981  			return GteIterVSU(at, bt[0], rt, ait, rit)
  2982  		default:
  2983  			return GteIterU(at, bt, rt, ait, bit, rit)
  2984  		}
  2985  	case Uint8:
  2986  		at := a.Uint8s()
  2987  		bt := b.Uint8s()
  2988  		switch {
  2989  		case as && bs:
  2990  			GteU8(at, bt, rt)
  2991  			return
  2992  		case as && !bs:
  2993  			return GteIterSVU8(at[0], bt, rt, bit, rit)
  2994  		case !as && bs:
  2995  			return GteIterVSU8(at, bt[0], rt, ait, rit)
  2996  		default:
  2997  			return GteIterU8(at, bt, rt, ait, bit, rit)
  2998  		}
  2999  	case Uint16:
  3000  		at := a.Uint16s()
  3001  		bt := b.Uint16s()
  3002  		switch {
  3003  		case as && bs:
  3004  			GteU16(at, bt, rt)
  3005  			return
  3006  		case as && !bs:
  3007  			return GteIterSVU16(at[0], bt, rt, bit, rit)
  3008  		case !as && bs:
  3009  			return GteIterVSU16(at, bt[0], rt, ait, rit)
  3010  		default:
  3011  			return GteIterU16(at, bt, rt, ait, bit, rit)
  3012  		}
  3013  	case Uint32:
  3014  		at := a.Uint32s()
  3015  		bt := b.Uint32s()
  3016  		switch {
  3017  		case as && bs:
  3018  			GteU32(at, bt, rt)
  3019  			return
  3020  		case as && !bs:
  3021  			return GteIterSVU32(at[0], bt, rt, bit, rit)
  3022  		case !as && bs:
  3023  			return GteIterVSU32(at, bt[0], rt, ait, rit)
  3024  		default:
  3025  			return GteIterU32(at, bt, rt, ait, bit, rit)
  3026  		}
  3027  	case Uint64:
  3028  		at := a.Uint64s()
  3029  		bt := b.Uint64s()
  3030  		switch {
  3031  		case as && bs:
  3032  			GteU64(at, bt, rt)
  3033  			return
  3034  		case as && !bs:
  3035  			return GteIterSVU64(at[0], bt, rt, bit, rit)
  3036  		case !as && bs:
  3037  			return GteIterVSU64(at, bt[0], rt, ait, rit)
  3038  		default:
  3039  			return GteIterU64(at, bt, rt, ait, bit, rit)
  3040  		}
  3041  	case Float32:
  3042  		at := a.Float32s()
  3043  		bt := b.Float32s()
  3044  		switch {
  3045  		case as && bs:
  3046  			GteF32(at, bt, rt)
  3047  			return
  3048  		case as && !bs:
  3049  			return GteIterSVF32(at[0], bt, rt, bit, rit)
  3050  		case !as && bs:
  3051  			return GteIterVSF32(at, bt[0], rt, ait, rit)
  3052  		default:
  3053  			return GteIterF32(at, bt, rt, ait, bit, rit)
  3054  		}
  3055  	case Float64:
  3056  		at := a.Float64s()
  3057  		bt := b.Float64s()
  3058  		switch {
  3059  		case as && bs:
  3060  			GteF64(at, bt, rt)
  3061  			return
  3062  		case as && !bs:
  3063  			return GteIterSVF64(at[0], bt, rt, bit, rit)
  3064  		case !as && bs:
  3065  			return GteIterVSF64(at, bt[0], rt, ait, rit)
  3066  		default:
  3067  			return GteIterF64(at, bt, rt, ait, bit, rit)
  3068  		}
  3069  	case String:
  3070  		at := a.Strings()
  3071  		bt := b.Strings()
  3072  		switch {
  3073  		case as && bs:
  3074  			GteStr(at, bt, rt)
  3075  			return
  3076  		case as && !bs:
  3077  			return GteIterSVStr(at[0], bt, rt, bit, rit)
  3078  		case !as && bs:
  3079  			return GteIterVSStr(at, bt[0], rt, ait, rit)
  3080  		default:
  3081  			return GteIterStr(at, bt, rt, ait, bit, rit)
  3082  		}
  3083  	default:
  3084  		return errors.Errorf("Unsupported type %v for Gte", t)
  3085  	}
  3086  }
  3087  
  3088  func (e E) LtIter(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header, ait Iterator, bit Iterator, rit Iterator) (err error) {
  3089  	as := isScalar(a, t)
  3090  	bs := isScalar(b, t)
  3091  	rs := isScalar(retVal, Bool)
  3092  	rt := retVal.Bools()
  3093  
  3094  	if ((as && !bs) || (bs && !as)) && rs {
  3095  		return errors.Errorf("retVal is scalar while len(a): %d, len(b) %d", a.TypedLen(t), b.TypedLen(t))
  3096  	}
  3097  
  3098  	switch t {
  3099  	case Int:
  3100  		at := a.Ints()
  3101  		bt := b.Ints()
  3102  		switch {
  3103  		case as && bs:
  3104  			LtI(at, bt, rt)
  3105  			return
  3106  		case as && !bs:
  3107  			return LtIterSVI(at[0], bt, rt, bit, rit)
  3108  		case !as && bs:
  3109  			return LtIterVSI(at, bt[0], rt, ait, rit)
  3110  		default:
  3111  			return LtIterI(at, bt, rt, ait, bit, rit)
  3112  		}
  3113  	case Int8:
  3114  		at := a.Int8s()
  3115  		bt := b.Int8s()
  3116  		switch {
  3117  		case as && bs:
  3118  			LtI8(at, bt, rt)
  3119  			return
  3120  		case as && !bs:
  3121  			return LtIterSVI8(at[0], bt, rt, bit, rit)
  3122  		case !as && bs:
  3123  			return LtIterVSI8(at, bt[0], rt, ait, rit)
  3124  		default:
  3125  			return LtIterI8(at, bt, rt, ait, bit, rit)
  3126  		}
  3127  	case Int16:
  3128  		at := a.Int16s()
  3129  		bt := b.Int16s()
  3130  		switch {
  3131  		case as && bs:
  3132  			LtI16(at, bt, rt)
  3133  			return
  3134  		case as && !bs:
  3135  			return LtIterSVI16(at[0], bt, rt, bit, rit)
  3136  		case !as && bs:
  3137  			return LtIterVSI16(at, bt[0], rt, ait, rit)
  3138  		default:
  3139  			return LtIterI16(at, bt, rt, ait, bit, rit)
  3140  		}
  3141  	case Int32:
  3142  		at := a.Int32s()
  3143  		bt := b.Int32s()
  3144  		switch {
  3145  		case as && bs:
  3146  			LtI32(at, bt, rt)
  3147  			return
  3148  		case as && !bs:
  3149  			return LtIterSVI32(at[0], bt, rt, bit, rit)
  3150  		case !as && bs:
  3151  			return LtIterVSI32(at, bt[0], rt, ait, rit)
  3152  		default:
  3153  			return LtIterI32(at, bt, rt, ait, bit, rit)
  3154  		}
  3155  	case Int64:
  3156  		at := a.Int64s()
  3157  		bt := b.Int64s()
  3158  		switch {
  3159  		case as && bs:
  3160  			LtI64(at, bt, rt)
  3161  			return
  3162  		case as && !bs:
  3163  			return LtIterSVI64(at[0], bt, rt, bit, rit)
  3164  		case !as && bs:
  3165  			return LtIterVSI64(at, bt[0], rt, ait, rit)
  3166  		default:
  3167  			return LtIterI64(at, bt, rt, ait, bit, rit)
  3168  		}
  3169  	case Uint:
  3170  		at := a.Uints()
  3171  		bt := b.Uints()
  3172  		switch {
  3173  		case as && bs:
  3174  			LtU(at, bt, rt)
  3175  			return
  3176  		case as && !bs:
  3177  			return LtIterSVU(at[0], bt, rt, bit, rit)
  3178  		case !as && bs:
  3179  			return LtIterVSU(at, bt[0], rt, ait, rit)
  3180  		default:
  3181  			return LtIterU(at, bt, rt, ait, bit, rit)
  3182  		}
  3183  	case Uint8:
  3184  		at := a.Uint8s()
  3185  		bt := b.Uint8s()
  3186  		switch {
  3187  		case as && bs:
  3188  			LtU8(at, bt, rt)
  3189  			return
  3190  		case as && !bs:
  3191  			return LtIterSVU8(at[0], bt, rt, bit, rit)
  3192  		case !as && bs:
  3193  			return LtIterVSU8(at, bt[0], rt, ait, rit)
  3194  		default:
  3195  			return LtIterU8(at, bt, rt, ait, bit, rit)
  3196  		}
  3197  	case Uint16:
  3198  		at := a.Uint16s()
  3199  		bt := b.Uint16s()
  3200  		switch {
  3201  		case as && bs:
  3202  			LtU16(at, bt, rt)
  3203  			return
  3204  		case as && !bs:
  3205  			return LtIterSVU16(at[0], bt, rt, bit, rit)
  3206  		case !as && bs:
  3207  			return LtIterVSU16(at, bt[0], rt, ait, rit)
  3208  		default:
  3209  			return LtIterU16(at, bt, rt, ait, bit, rit)
  3210  		}
  3211  	case Uint32:
  3212  		at := a.Uint32s()
  3213  		bt := b.Uint32s()
  3214  		switch {
  3215  		case as && bs:
  3216  			LtU32(at, bt, rt)
  3217  			return
  3218  		case as && !bs:
  3219  			return LtIterSVU32(at[0], bt, rt, bit, rit)
  3220  		case !as && bs:
  3221  			return LtIterVSU32(at, bt[0], rt, ait, rit)
  3222  		default:
  3223  			return LtIterU32(at, bt, rt, ait, bit, rit)
  3224  		}
  3225  	case Uint64:
  3226  		at := a.Uint64s()
  3227  		bt := b.Uint64s()
  3228  		switch {
  3229  		case as && bs:
  3230  			LtU64(at, bt, rt)
  3231  			return
  3232  		case as && !bs:
  3233  			return LtIterSVU64(at[0], bt, rt, bit, rit)
  3234  		case !as && bs:
  3235  			return LtIterVSU64(at, bt[0], rt, ait, rit)
  3236  		default:
  3237  			return LtIterU64(at, bt, rt, ait, bit, rit)
  3238  		}
  3239  	case Float32:
  3240  		at := a.Float32s()
  3241  		bt := b.Float32s()
  3242  		switch {
  3243  		case as && bs:
  3244  			LtF32(at, bt, rt)
  3245  			return
  3246  		case as && !bs:
  3247  			return LtIterSVF32(at[0], bt, rt, bit, rit)
  3248  		case !as && bs:
  3249  			return LtIterVSF32(at, bt[0], rt, ait, rit)
  3250  		default:
  3251  			return LtIterF32(at, bt, rt, ait, bit, rit)
  3252  		}
  3253  	case Float64:
  3254  		at := a.Float64s()
  3255  		bt := b.Float64s()
  3256  		switch {
  3257  		case as && bs:
  3258  			LtF64(at, bt, rt)
  3259  			return
  3260  		case as && !bs:
  3261  			return LtIterSVF64(at[0], bt, rt, bit, rit)
  3262  		case !as && bs:
  3263  			return LtIterVSF64(at, bt[0], rt, ait, rit)
  3264  		default:
  3265  			return LtIterF64(at, bt, rt, ait, bit, rit)
  3266  		}
  3267  	case String:
  3268  		at := a.Strings()
  3269  		bt := b.Strings()
  3270  		switch {
  3271  		case as && bs:
  3272  			LtStr(at, bt, rt)
  3273  			return
  3274  		case as && !bs:
  3275  			return LtIterSVStr(at[0], bt, rt, bit, rit)
  3276  		case !as && bs:
  3277  			return LtIterVSStr(at, bt[0], rt, ait, rit)
  3278  		default:
  3279  			return LtIterStr(at, bt, rt, ait, bit, rit)
  3280  		}
  3281  	default:
  3282  		return errors.Errorf("Unsupported type %v for Lt", t)
  3283  	}
  3284  }
  3285  
  3286  func (e E) LteIter(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header, ait Iterator, bit Iterator, rit Iterator) (err error) {
  3287  	as := isScalar(a, t)
  3288  	bs := isScalar(b, t)
  3289  	rs := isScalar(retVal, Bool)
  3290  	rt := retVal.Bools()
  3291  
  3292  	if ((as && !bs) || (bs && !as)) && rs {
  3293  		return errors.Errorf("retVal is scalar while len(a): %d, len(b) %d", a.TypedLen(t), b.TypedLen(t))
  3294  	}
  3295  
  3296  	switch t {
  3297  	case Int:
  3298  		at := a.Ints()
  3299  		bt := b.Ints()
  3300  		switch {
  3301  		case as && bs:
  3302  			LteI(at, bt, rt)
  3303  			return
  3304  		case as && !bs:
  3305  			return LteIterSVI(at[0], bt, rt, bit, rit)
  3306  		case !as && bs:
  3307  			return LteIterVSI(at, bt[0], rt, ait, rit)
  3308  		default:
  3309  			return LteIterI(at, bt, rt, ait, bit, rit)
  3310  		}
  3311  	case Int8:
  3312  		at := a.Int8s()
  3313  		bt := b.Int8s()
  3314  		switch {
  3315  		case as && bs:
  3316  			LteI8(at, bt, rt)
  3317  			return
  3318  		case as && !bs:
  3319  			return LteIterSVI8(at[0], bt, rt, bit, rit)
  3320  		case !as && bs:
  3321  			return LteIterVSI8(at, bt[0], rt, ait, rit)
  3322  		default:
  3323  			return LteIterI8(at, bt, rt, ait, bit, rit)
  3324  		}
  3325  	case Int16:
  3326  		at := a.Int16s()
  3327  		bt := b.Int16s()
  3328  		switch {
  3329  		case as && bs:
  3330  			LteI16(at, bt, rt)
  3331  			return
  3332  		case as && !bs:
  3333  			return LteIterSVI16(at[0], bt, rt, bit, rit)
  3334  		case !as && bs:
  3335  			return LteIterVSI16(at, bt[0], rt, ait, rit)
  3336  		default:
  3337  			return LteIterI16(at, bt, rt, ait, bit, rit)
  3338  		}
  3339  	case Int32:
  3340  		at := a.Int32s()
  3341  		bt := b.Int32s()
  3342  		switch {
  3343  		case as && bs:
  3344  			LteI32(at, bt, rt)
  3345  			return
  3346  		case as && !bs:
  3347  			return LteIterSVI32(at[0], bt, rt, bit, rit)
  3348  		case !as && bs:
  3349  			return LteIterVSI32(at, bt[0], rt, ait, rit)
  3350  		default:
  3351  			return LteIterI32(at, bt, rt, ait, bit, rit)
  3352  		}
  3353  	case Int64:
  3354  		at := a.Int64s()
  3355  		bt := b.Int64s()
  3356  		switch {
  3357  		case as && bs:
  3358  			LteI64(at, bt, rt)
  3359  			return
  3360  		case as && !bs:
  3361  			return LteIterSVI64(at[0], bt, rt, bit, rit)
  3362  		case !as && bs:
  3363  			return LteIterVSI64(at, bt[0], rt, ait, rit)
  3364  		default:
  3365  			return LteIterI64(at, bt, rt, ait, bit, rit)
  3366  		}
  3367  	case Uint:
  3368  		at := a.Uints()
  3369  		bt := b.Uints()
  3370  		switch {
  3371  		case as && bs:
  3372  			LteU(at, bt, rt)
  3373  			return
  3374  		case as && !bs:
  3375  			return LteIterSVU(at[0], bt, rt, bit, rit)
  3376  		case !as && bs:
  3377  			return LteIterVSU(at, bt[0], rt, ait, rit)
  3378  		default:
  3379  			return LteIterU(at, bt, rt, ait, bit, rit)
  3380  		}
  3381  	case Uint8:
  3382  		at := a.Uint8s()
  3383  		bt := b.Uint8s()
  3384  		switch {
  3385  		case as && bs:
  3386  			LteU8(at, bt, rt)
  3387  			return
  3388  		case as && !bs:
  3389  			return LteIterSVU8(at[0], bt, rt, bit, rit)
  3390  		case !as && bs:
  3391  			return LteIterVSU8(at, bt[0], rt, ait, rit)
  3392  		default:
  3393  			return LteIterU8(at, bt, rt, ait, bit, rit)
  3394  		}
  3395  	case Uint16:
  3396  		at := a.Uint16s()
  3397  		bt := b.Uint16s()
  3398  		switch {
  3399  		case as && bs:
  3400  			LteU16(at, bt, rt)
  3401  			return
  3402  		case as && !bs:
  3403  			return LteIterSVU16(at[0], bt, rt, bit, rit)
  3404  		case !as && bs:
  3405  			return LteIterVSU16(at, bt[0], rt, ait, rit)
  3406  		default:
  3407  			return LteIterU16(at, bt, rt, ait, bit, rit)
  3408  		}
  3409  	case Uint32:
  3410  		at := a.Uint32s()
  3411  		bt := b.Uint32s()
  3412  		switch {
  3413  		case as && bs:
  3414  			LteU32(at, bt, rt)
  3415  			return
  3416  		case as && !bs:
  3417  			return LteIterSVU32(at[0], bt, rt, bit, rit)
  3418  		case !as && bs:
  3419  			return LteIterVSU32(at, bt[0], rt, ait, rit)
  3420  		default:
  3421  			return LteIterU32(at, bt, rt, ait, bit, rit)
  3422  		}
  3423  	case Uint64:
  3424  		at := a.Uint64s()
  3425  		bt := b.Uint64s()
  3426  		switch {
  3427  		case as && bs:
  3428  			LteU64(at, bt, rt)
  3429  			return
  3430  		case as && !bs:
  3431  			return LteIterSVU64(at[0], bt, rt, bit, rit)
  3432  		case !as && bs:
  3433  			return LteIterVSU64(at, bt[0], rt, ait, rit)
  3434  		default:
  3435  			return LteIterU64(at, bt, rt, ait, bit, rit)
  3436  		}
  3437  	case Float32:
  3438  		at := a.Float32s()
  3439  		bt := b.Float32s()
  3440  		switch {
  3441  		case as && bs:
  3442  			LteF32(at, bt, rt)
  3443  			return
  3444  		case as && !bs:
  3445  			return LteIterSVF32(at[0], bt, rt, bit, rit)
  3446  		case !as && bs:
  3447  			return LteIterVSF32(at, bt[0], rt, ait, rit)
  3448  		default:
  3449  			return LteIterF32(at, bt, rt, ait, bit, rit)
  3450  		}
  3451  	case Float64:
  3452  		at := a.Float64s()
  3453  		bt := b.Float64s()
  3454  		switch {
  3455  		case as && bs:
  3456  			LteF64(at, bt, rt)
  3457  			return
  3458  		case as && !bs:
  3459  			return LteIterSVF64(at[0], bt, rt, bit, rit)
  3460  		case !as && bs:
  3461  			return LteIterVSF64(at, bt[0], rt, ait, rit)
  3462  		default:
  3463  			return LteIterF64(at, bt, rt, ait, bit, rit)
  3464  		}
  3465  	case String:
  3466  		at := a.Strings()
  3467  		bt := b.Strings()
  3468  		switch {
  3469  		case as && bs:
  3470  			LteStr(at, bt, rt)
  3471  			return
  3472  		case as && !bs:
  3473  			return LteIterSVStr(at[0], bt, rt, bit, rit)
  3474  		case !as && bs:
  3475  			return LteIterVSStr(at, bt[0], rt, ait, rit)
  3476  		default:
  3477  			return LteIterStr(at, bt, rt, ait, bit, rit)
  3478  		}
  3479  	default:
  3480  		return errors.Errorf("Unsupported type %v for Lte", t)
  3481  	}
  3482  }
  3483  
  3484  func (e E) EqIter(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header, ait Iterator, bit Iterator, rit Iterator) (err error) {
  3485  	as := isScalar(a, t)
  3486  	bs := isScalar(b, t)
  3487  	rs := isScalar(retVal, Bool)
  3488  	rt := retVal.Bools()
  3489  
  3490  	if ((as && !bs) || (bs && !as)) && rs {
  3491  		return errors.Errorf("retVal is scalar while len(a): %d, len(b) %d", a.TypedLen(t), b.TypedLen(t))
  3492  	}
  3493  
  3494  	switch t {
  3495  	case Bool:
  3496  		at := a.Bools()
  3497  		bt := b.Bools()
  3498  		switch {
  3499  		case as && bs:
  3500  			EqB(at, bt, rt)
  3501  			return
  3502  		case as && !bs:
  3503  			return EqIterSVB(at[0], bt, rt, bit, rit)
  3504  		case !as && bs:
  3505  			return EqIterVSB(at, bt[0], rt, ait, rit)
  3506  		default:
  3507  			return EqIterB(at, bt, rt, ait, bit, rit)
  3508  		}
  3509  	case Int:
  3510  		at := a.Ints()
  3511  		bt := b.Ints()
  3512  		switch {
  3513  		case as && bs:
  3514  			EqI(at, bt, rt)
  3515  			return
  3516  		case as && !bs:
  3517  			return EqIterSVI(at[0], bt, rt, bit, rit)
  3518  		case !as && bs:
  3519  			return EqIterVSI(at, bt[0], rt, ait, rit)
  3520  		default:
  3521  			return EqIterI(at, bt, rt, ait, bit, rit)
  3522  		}
  3523  	case Int8:
  3524  		at := a.Int8s()
  3525  		bt := b.Int8s()
  3526  		switch {
  3527  		case as && bs:
  3528  			EqI8(at, bt, rt)
  3529  			return
  3530  		case as && !bs:
  3531  			return EqIterSVI8(at[0], bt, rt, bit, rit)
  3532  		case !as && bs:
  3533  			return EqIterVSI8(at, bt[0], rt, ait, rit)
  3534  		default:
  3535  			return EqIterI8(at, bt, rt, ait, bit, rit)
  3536  		}
  3537  	case Int16:
  3538  		at := a.Int16s()
  3539  		bt := b.Int16s()
  3540  		switch {
  3541  		case as && bs:
  3542  			EqI16(at, bt, rt)
  3543  			return
  3544  		case as && !bs:
  3545  			return EqIterSVI16(at[0], bt, rt, bit, rit)
  3546  		case !as && bs:
  3547  			return EqIterVSI16(at, bt[0], rt, ait, rit)
  3548  		default:
  3549  			return EqIterI16(at, bt, rt, ait, bit, rit)
  3550  		}
  3551  	case Int32:
  3552  		at := a.Int32s()
  3553  		bt := b.Int32s()
  3554  		switch {
  3555  		case as && bs:
  3556  			EqI32(at, bt, rt)
  3557  			return
  3558  		case as && !bs:
  3559  			return EqIterSVI32(at[0], bt, rt, bit, rit)
  3560  		case !as && bs:
  3561  			return EqIterVSI32(at, bt[0], rt, ait, rit)
  3562  		default:
  3563  			return EqIterI32(at, bt, rt, ait, bit, rit)
  3564  		}
  3565  	case Int64:
  3566  		at := a.Int64s()
  3567  		bt := b.Int64s()
  3568  		switch {
  3569  		case as && bs:
  3570  			EqI64(at, bt, rt)
  3571  			return
  3572  		case as && !bs:
  3573  			return EqIterSVI64(at[0], bt, rt, bit, rit)
  3574  		case !as && bs:
  3575  			return EqIterVSI64(at, bt[0], rt, ait, rit)
  3576  		default:
  3577  			return EqIterI64(at, bt, rt, ait, bit, rit)
  3578  		}
  3579  	case Uint:
  3580  		at := a.Uints()
  3581  		bt := b.Uints()
  3582  		switch {
  3583  		case as && bs:
  3584  			EqU(at, bt, rt)
  3585  			return
  3586  		case as && !bs:
  3587  			return EqIterSVU(at[0], bt, rt, bit, rit)
  3588  		case !as && bs:
  3589  			return EqIterVSU(at, bt[0], rt, ait, rit)
  3590  		default:
  3591  			return EqIterU(at, bt, rt, ait, bit, rit)
  3592  		}
  3593  	case Uint8:
  3594  		at := a.Uint8s()
  3595  		bt := b.Uint8s()
  3596  		switch {
  3597  		case as && bs:
  3598  			EqU8(at, bt, rt)
  3599  			return
  3600  		case as && !bs:
  3601  			return EqIterSVU8(at[0], bt, rt, bit, rit)
  3602  		case !as && bs:
  3603  			return EqIterVSU8(at, bt[0], rt, ait, rit)
  3604  		default:
  3605  			return EqIterU8(at, bt, rt, ait, bit, rit)
  3606  		}
  3607  	case Uint16:
  3608  		at := a.Uint16s()
  3609  		bt := b.Uint16s()
  3610  		switch {
  3611  		case as && bs:
  3612  			EqU16(at, bt, rt)
  3613  			return
  3614  		case as && !bs:
  3615  			return EqIterSVU16(at[0], bt, rt, bit, rit)
  3616  		case !as && bs:
  3617  			return EqIterVSU16(at, bt[0], rt, ait, rit)
  3618  		default:
  3619  			return EqIterU16(at, bt, rt, ait, bit, rit)
  3620  		}
  3621  	case Uint32:
  3622  		at := a.Uint32s()
  3623  		bt := b.Uint32s()
  3624  		switch {
  3625  		case as && bs:
  3626  			EqU32(at, bt, rt)
  3627  			return
  3628  		case as && !bs:
  3629  			return EqIterSVU32(at[0], bt, rt, bit, rit)
  3630  		case !as && bs:
  3631  			return EqIterVSU32(at, bt[0], rt, ait, rit)
  3632  		default:
  3633  			return EqIterU32(at, bt, rt, ait, bit, rit)
  3634  		}
  3635  	case Uint64:
  3636  		at := a.Uint64s()
  3637  		bt := b.Uint64s()
  3638  		switch {
  3639  		case as && bs:
  3640  			EqU64(at, bt, rt)
  3641  			return
  3642  		case as && !bs:
  3643  			return EqIterSVU64(at[0], bt, rt, bit, rit)
  3644  		case !as && bs:
  3645  			return EqIterVSU64(at, bt[0], rt, ait, rit)
  3646  		default:
  3647  			return EqIterU64(at, bt, rt, ait, bit, rit)
  3648  		}
  3649  	case Uintptr:
  3650  		at := a.Uintptrs()
  3651  		bt := b.Uintptrs()
  3652  		switch {
  3653  		case as && bs:
  3654  			EqUintptr(at, bt, rt)
  3655  			return
  3656  		case as && !bs:
  3657  			return EqIterSVUintptr(at[0], bt, rt, bit, rit)
  3658  		case !as && bs:
  3659  			return EqIterVSUintptr(at, bt[0], rt, ait, rit)
  3660  		default:
  3661  			return EqIterUintptr(at, bt, rt, ait, bit, rit)
  3662  		}
  3663  	case Float32:
  3664  		at := a.Float32s()
  3665  		bt := b.Float32s()
  3666  		switch {
  3667  		case as && bs:
  3668  			EqF32(at, bt, rt)
  3669  			return
  3670  		case as && !bs:
  3671  			return EqIterSVF32(at[0], bt, rt, bit, rit)
  3672  		case !as && bs:
  3673  			return EqIterVSF32(at, bt[0], rt, ait, rit)
  3674  		default:
  3675  			return EqIterF32(at, bt, rt, ait, bit, rit)
  3676  		}
  3677  	case Float64:
  3678  		at := a.Float64s()
  3679  		bt := b.Float64s()
  3680  		switch {
  3681  		case as && bs:
  3682  			EqF64(at, bt, rt)
  3683  			return
  3684  		case as && !bs:
  3685  			return EqIterSVF64(at[0], bt, rt, bit, rit)
  3686  		case !as && bs:
  3687  			return EqIterVSF64(at, bt[0], rt, ait, rit)
  3688  		default:
  3689  			return EqIterF64(at, bt, rt, ait, bit, rit)
  3690  		}
  3691  	case Complex64:
  3692  		at := a.Complex64s()
  3693  		bt := b.Complex64s()
  3694  		switch {
  3695  		case as && bs:
  3696  			EqC64(at, bt, rt)
  3697  			return
  3698  		case as && !bs:
  3699  			return EqIterSVC64(at[0], bt, rt, bit, rit)
  3700  		case !as && bs:
  3701  			return EqIterVSC64(at, bt[0], rt, ait, rit)
  3702  		default:
  3703  			return EqIterC64(at, bt, rt, ait, bit, rit)
  3704  		}
  3705  	case Complex128:
  3706  		at := a.Complex128s()
  3707  		bt := b.Complex128s()
  3708  		switch {
  3709  		case as && bs:
  3710  			EqC128(at, bt, rt)
  3711  			return
  3712  		case as && !bs:
  3713  			return EqIterSVC128(at[0], bt, rt, bit, rit)
  3714  		case !as && bs:
  3715  			return EqIterVSC128(at, bt[0], rt, ait, rit)
  3716  		default:
  3717  			return EqIterC128(at, bt, rt, ait, bit, rit)
  3718  		}
  3719  	case String:
  3720  		at := a.Strings()
  3721  		bt := b.Strings()
  3722  		switch {
  3723  		case as && bs:
  3724  			EqStr(at, bt, rt)
  3725  			return
  3726  		case as && !bs:
  3727  			return EqIterSVStr(at[0], bt, rt, bit, rit)
  3728  		case !as && bs:
  3729  			return EqIterVSStr(at, bt[0], rt, ait, rit)
  3730  		default:
  3731  			return EqIterStr(at, bt, rt, ait, bit, rit)
  3732  		}
  3733  	case UnsafePointer:
  3734  		at := a.UnsafePointers()
  3735  		bt := b.UnsafePointers()
  3736  		switch {
  3737  		case as && bs:
  3738  			EqUnsafePointer(at, bt, rt)
  3739  			return
  3740  		case as && !bs:
  3741  			return EqIterSVUnsafePointer(at[0], bt, rt, bit, rit)
  3742  		case !as && bs:
  3743  			return EqIterVSUnsafePointer(at, bt[0], rt, ait, rit)
  3744  		default:
  3745  			return EqIterUnsafePointer(at, bt, rt, ait, bit, rit)
  3746  		}
  3747  	default:
  3748  		return errors.Errorf("Unsupported type %v for Eq", t)
  3749  	}
  3750  }
  3751  
  3752  func (e E) NeIter(t reflect.Type, a *storage.Header, b *storage.Header, retVal *storage.Header, ait Iterator, bit Iterator, rit Iterator) (err error) {
  3753  	as := isScalar(a, t)
  3754  	bs := isScalar(b, t)
  3755  	rs := isScalar(retVal, Bool)
  3756  	rt := retVal.Bools()
  3757  
  3758  	if ((as && !bs) || (bs && !as)) && rs {
  3759  		return errors.Errorf("retVal is scalar while len(a): %d, len(b) %d", a.TypedLen(t), b.TypedLen(t))
  3760  	}
  3761  
  3762  	switch t {
  3763  	case Bool:
  3764  		at := a.Bools()
  3765  		bt := b.Bools()
  3766  		switch {
  3767  		case as && bs:
  3768  			NeB(at, bt, rt)
  3769  			return
  3770  		case as && !bs:
  3771  			return NeIterSVB(at[0], bt, rt, bit, rit)
  3772  		case !as && bs:
  3773  			return NeIterVSB(at, bt[0], rt, ait, rit)
  3774  		default:
  3775  			return NeIterB(at, bt, rt, ait, bit, rit)
  3776  		}
  3777  	case Int:
  3778  		at := a.Ints()
  3779  		bt := b.Ints()
  3780  		switch {
  3781  		case as && bs:
  3782  			NeI(at, bt, rt)
  3783  			return
  3784  		case as && !bs:
  3785  			return NeIterSVI(at[0], bt, rt, bit, rit)
  3786  		case !as && bs:
  3787  			return NeIterVSI(at, bt[0], rt, ait, rit)
  3788  		default:
  3789  			return NeIterI(at, bt, rt, ait, bit, rit)
  3790  		}
  3791  	case Int8:
  3792  		at := a.Int8s()
  3793  		bt := b.Int8s()
  3794  		switch {
  3795  		case as && bs:
  3796  			NeI8(at, bt, rt)
  3797  			return
  3798  		case as && !bs:
  3799  			return NeIterSVI8(at[0], bt, rt, bit, rit)
  3800  		case !as && bs:
  3801  			return NeIterVSI8(at, bt[0], rt, ait, rit)
  3802  		default:
  3803  			return NeIterI8(at, bt, rt, ait, bit, rit)
  3804  		}
  3805  	case Int16:
  3806  		at := a.Int16s()
  3807  		bt := b.Int16s()
  3808  		switch {
  3809  		case as && bs:
  3810  			NeI16(at, bt, rt)
  3811  			return
  3812  		case as && !bs:
  3813  			return NeIterSVI16(at[0], bt, rt, bit, rit)
  3814  		case !as && bs:
  3815  			return NeIterVSI16(at, bt[0], rt, ait, rit)
  3816  		default:
  3817  			return NeIterI16(at, bt, rt, ait, bit, rit)
  3818  		}
  3819  	case Int32:
  3820  		at := a.Int32s()
  3821  		bt := b.Int32s()
  3822  		switch {
  3823  		case as && bs:
  3824  			NeI32(at, bt, rt)
  3825  			return
  3826  		case as && !bs:
  3827  			return NeIterSVI32(at[0], bt, rt, bit, rit)
  3828  		case !as && bs:
  3829  			return NeIterVSI32(at, bt[0], rt, ait, rit)
  3830  		default:
  3831  			return NeIterI32(at, bt, rt, ait, bit, rit)
  3832  		}
  3833  	case Int64:
  3834  		at := a.Int64s()
  3835  		bt := b.Int64s()
  3836  		switch {
  3837  		case as && bs:
  3838  			NeI64(at, bt, rt)
  3839  			return
  3840  		case as && !bs:
  3841  			return NeIterSVI64(at[0], bt, rt, bit, rit)
  3842  		case !as && bs:
  3843  			return NeIterVSI64(at, bt[0], rt, ait, rit)
  3844  		default:
  3845  			return NeIterI64(at, bt, rt, ait, bit, rit)
  3846  		}
  3847  	case Uint:
  3848  		at := a.Uints()
  3849  		bt := b.Uints()
  3850  		switch {
  3851  		case as && bs:
  3852  			NeU(at, bt, rt)
  3853  			return
  3854  		case as && !bs:
  3855  			return NeIterSVU(at[0], bt, rt, bit, rit)
  3856  		case !as && bs:
  3857  			return NeIterVSU(at, bt[0], rt, ait, rit)
  3858  		default:
  3859  			return NeIterU(at, bt, rt, ait, bit, rit)
  3860  		}
  3861  	case Uint8:
  3862  		at := a.Uint8s()
  3863  		bt := b.Uint8s()
  3864  		switch {
  3865  		case as && bs:
  3866  			NeU8(at, bt, rt)
  3867  			return
  3868  		case as && !bs:
  3869  			return NeIterSVU8(at[0], bt, rt, bit, rit)
  3870  		case !as && bs:
  3871  			return NeIterVSU8(at, bt[0], rt, ait, rit)
  3872  		default:
  3873  			return NeIterU8(at, bt, rt, ait, bit, rit)
  3874  		}
  3875  	case Uint16:
  3876  		at := a.Uint16s()
  3877  		bt := b.Uint16s()
  3878  		switch {
  3879  		case as && bs:
  3880  			NeU16(at, bt, rt)
  3881  			return
  3882  		case as && !bs:
  3883  			return NeIterSVU16(at[0], bt, rt, bit, rit)
  3884  		case !as && bs:
  3885  			return NeIterVSU16(at, bt[0], rt, ait, rit)
  3886  		default:
  3887  			return NeIterU16(at, bt, rt, ait, bit, rit)
  3888  		}
  3889  	case Uint32:
  3890  		at := a.Uint32s()
  3891  		bt := b.Uint32s()
  3892  		switch {
  3893  		case as && bs:
  3894  			NeU32(at, bt, rt)
  3895  			return
  3896  		case as && !bs:
  3897  			return NeIterSVU32(at[0], bt, rt, bit, rit)
  3898  		case !as && bs:
  3899  			return NeIterVSU32(at, bt[0], rt, ait, rit)
  3900  		default:
  3901  			return NeIterU32(at, bt, rt, ait, bit, rit)
  3902  		}
  3903  	case Uint64:
  3904  		at := a.Uint64s()
  3905  		bt := b.Uint64s()
  3906  		switch {
  3907  		case as && bs:
  3908  			NeU64(at, bt, rt)
  3909  			return
  3910  		case as && !bs:
  3911  			return NeIterSVU64(at[0], bt, rt, bit, rit)
  3912  		case !as && bs:
  3913  			return NeIterVSU64(at, bt[0], rt, ait, rit)
  3914  		default:
  3915  			return NeIterU64(at, bt, rt, ait, bit, rit)
  3916  		}
  3917  	case Uintptr:
  3918  		at := a.Uintptrs()
  3919  		bt := b.Uintptrs()
  3920  		switch {
  3921  		case as && bs:
  3922  			NeUintptr(at, bt, rt)
  3923  			return
  3924  		case as && !bs:
  3925  			return NeIterSVUintptr(at[0], bt, rt, bit, rit)
  3926  		case !as && bs:
  3927  			return NeIterVSUintptr(at, bt[0], rt, ait, rit)
  3928  		default:
  3929  			return NeIterUintptr(at, bt, rt, ait, bit, rit)
  3930  		}
  3931  	case Float32:
  3932  		at := a.Float32s()
  3933  		bt := b.Float32s()
  3934  		switch {
  3935  		case as && bs:
  3936  			NeF32(at, bt, rt)
  3937  			return
  3938  		case as && !bs:
  3939  			return NeIterSVF32(at[0], bt, rt, bit, rit)
  3940  		case !as && bs:
  3941  			return NeIterVSF32(at, bt[0], rt, ait, rit)
  3942  		default:
  3943  			return NeIterF32(at, bt, rt, ait, bit, rit)
  3944  		}
  3945  	case Float64:
  3946  		at := a.Float64s()
  3947  		bt := b.Float64s()
  3948  		switch {
  3949  		case as && bs:
  3950  			NeF64(at, bt, rt)
  3951  			return
  3952  		case as && !bs:
  3953  			return NeIterSVF64(at[0], bt, rt, bit, rit)
  3954  		case !as && bs:
  3955  			return NeIterVSF64(at, bt[0], rt, ait, rit)
  3956  		default:
  3957  			return NeIterF64(at, bt, rt, ait, bit, rit)
  3958  		}
  3959  	case Complex64:
  3960  		at := a.Complex64s()
  3961  		bt := b.Complex64s()
  3962  		switch {
  3963  		case as && bs:
  3964  			NeC64(at, bt, rt)
  3965  			return
  3966  		case as && !bs:
  3967  			return NeIterSVC64(at[0], bt, rt, bit, rit)
  3968  		case !as && bs:
  3969  			return NeIterVSC64(at, bt[0], rt, ait, rit)
  3970  		default:
  3971  			return NeIterC64(at, bt, rt, ait, bit, rit)
  3972  		}
  3973  	case Complex128:
  3974  		at := a.Complex128s()
  3975  		bt := b.Complex128s()
  3976  		switch {
  3977  		case as && bs:
  3978  			NeC128(at, bt, rt)
  3979  			return
  3980  		case as && !bs:
  3981  			return NeIterSVC128(at[0], bt, rt, bit, rit)
  3982  		case !as && bs:
  3983  			return NeIterVSC128(at, bt[0], rt, ait, rit)
  3984  		default:
  3985  			return NeIterC128(at, bt, rt, ait, bit, rit)
  3986  		}
  3987  	case String:
  3988  		at := a.Strings()
  3989  		bt := b.Strings()
  3990  		switch {
  3991  		case as && bs:
  3992  			NeStr(at, bt, rt)
  3993  			return
  3994  		case as && !bs:
  3995  			return NeIterSVStr(at[0], bt, rt, bit, rit)
  3996  		case !as && bs:
  3997  			return NeIterVSStr(at, bt[0], rt, ait, rit)
  3998  		default:
  3999  			return NeIterStr(at, bt, rt, ait, bit, rit)
  4000  		}
  4001  	case UnsafePointer:
  4002  		at := a.UnsafePointers()
  4003  		bt := b.UnsafePointers()
  4004  		switch {
  4005  		case as && bs:
  4006  			NeUnsafePointer(at, bt, rt)
  4007  			return
  4008  		case as && !bs:
  4009  			return NeIterSVUnsafePointer(at[0], bt, rt, bit, rit)
  4010  		case !as && bs:
  4011  			return NeIterVSUnsafePointer(at, bt[0], rt, ait, rit)
  4012  		default:
  4013  			return NeIterUnsafePointer(at, bt, rt, ait, bit, rit)
  4014  		}
  4015  	default:
  4016  		return errors.Errorf("Unsupported type %v for Ne", t)
  4017  	}
  4018  }
  4019  
  4020  func (e E) GtSameIter(t reflect.Type, a *storage.Header, b *storage.Header, ait Iterator, bit Iterator) (err error) {
  4021  	as := isScalar(a, t)
  4022  	bs := isScalar(b, t)
  4023  
  4024  	switch t {
  4025  	case Int:
  4026  		at := a.Ints()
  4027  		bt := b.Ints()
  4028  		switch {
  4029  		case as && bs:
  4030  			GtSameI(at, bt)
  4031  		case as && !bs:
  4032  			GtSameIterSVI(at[0], bt, bit)
  4033  		case !as && bs:
  4034  			GtSameIterVSI(at, bt[0], ait)
  4035  		default:
  4036  			GtSameIterI(at, bt, ait, bit)
  4037  		}
  4038  		return
  4039  	case Int8:
  4040  		at := a.Int8s()
  4041  		bt := b.Int8s()
  4042  		switch {
  4043  		case as && bs:
  4044  			GtSameI8(at, bt)
  4045  		case as && !bs:
  4046  			GtSameIterSVI8(at[0], bt, bit)
  4047  		case !as && bs:
  4048  			GtSameIterVSI8(at, bt[0], ait)
  4049  		default:
  4050  			GtSameIterI8(at, bt, ait, bit)
  4051  		}
  4052  		return
  4053  	case Int16:
  4054  		at := a.Int16s()
  4055  		bt := b.Int16s()
  4056  		switch {
  4057  		case as && bs:
  4058  			GtSameI16(at, bt)
  4059  		case as && !bs:
  4060  			GtSameIterSVI16(at[0], bt, bit)
  4061  		case !as && bs:
  4062  			GtSameIterVSI16(at, bt[0], ait)
  4063  		default:
  4064  			GtSameIterI16(at, bt, ait, bit)
  4065  		}
  4066  		return
  4067  	case Int32:
  4068  		at := a.Int32s()
  4069  		bt := b.Int32s()
  4070  		switch {
  4071  		case as && bs:
  4072  			GtSameI32(at, bt)
  4073  		case as && !bs:
  4074  			GtSameIterSVI32(at[0], bt, bit)
  4075  		case !as && bs:
  4076  			GtSameIterVSI32(at, bt[0], ait)
  4077  		default:
  4078  			GtSameIterI32(at, bt, ait, bit)
  4079  		}
  4080  		return
  4081  	case Int64:
  4082  		at := a.Int64s()
  4083  		bt := b.Int64s()
  4084  		switch {
  4085  		case as && bs:
  4086  			GtSameI64(at, bt)
  4087  		case as && !bs:
  4088  			GtSameIterSVI64(at[0], bt, bit)
  4089  		case !as && bs:
  4090  			GtSameIterVSI64(at, bt[0], ait)
  4091  		default:
  4092  			GtSameIterI64(at, bt, ait, bit)
  4093  		}
  4094  		return
  4095  	case Uint:
  4096  		at := a.Uints()
  4097  		bt := b.Uints()
  4098  		switch {
  4099  		case as && bs:
  4100  			GtSameU(at, bt)
  4101  		case as && !bs:
  4102  			GtSameIterSVU(at[0], bt, bit)
  4103  		case !as && bs:
  4104  			GtSameIterVSU(at, bt[0], ait)
  4105  		default:
  4106  			GtSameIterU(at, bt, ait, bit)
  4107  		}
  4108  		return
  4109  	case Uint8:
  4110  		at := a.Uint8s()
  4111  		bt := b.Uint8s()
  4112  		switch {
  4113  		case as && bs:
  4114  			GtSameU8(at, bt)
  4115  		case as && !bs:
  4116  			GtSameIterSVU8(at[0], bt, bit)
  4117  		case !as && bs:
  4118  			GtSameIterVSU8(at, bt[0], ait)
  4119  		default:
  4120  			GtSameIterU8(at, bt, ait, bit)
  4121  		}
  4122  		return
  4123  	case Uint16:
  4124  		at := a.Uint16s()
  4125  		bt := b.Uint16s()
  4126  		switch {
  4127  		case as && bs:
  4128  			GtSameU16(at, bt)
  4129  		case as && !bs:
  4130  			GtSameIterSVU16(at[0], bt, bit)
  4131  		case !as && bs:
  4132  			GtSameIterVSU16(at, bt[0], ait)
  4133  		default:
  4134  			GtSameIterU16(at, bt, ait, bit)
  4135  		}
  4136  		return
  4137  	case Uint32:
  4138  		at := a.Uint32s()
  4139  		bt := b.Uint32s()
  4140  		switch {
  4141  		case as && bs:
  4142  			GtSameU32(at, bt)
  4143  		case as && !bs:
  4144  			GtSameIterSVU32(at[0], bt, bit)
  4145  		case !as && bs:
  4146  			GtSameIterVSU32(at, bt[0], ait)
  4147  		default:
  4148  			GtSameIterU32(at, bt, ait, bit)
  4149  		}
  4150  		return
  4151  	case Uint64:
  4152  		at := a.Uint64s()
  4153  		bt := b.Uint64s()
  4154  		switch {
  4155  		case as && bs:
  4156  			GtSameU64(at, bt)
  4157  		case as && !bs:
  4158  			GtSameIterSVU64(at[0], bt, bit)
  4159  		case !as && bs:
  4160  			GtSameIterVSU64(at, bt[0], ait)
  4161  		default:
  4162  			GtSameIterU64(at, bt, ait, bit)
  4163  		}
  4164  		return
  4165  	case Float32:
  4166  		at := a.Float32s()
  4167  		bt := b.Float32s()
  4168  		switch {
  4169  		case as && bs:
  4170  			GtSameF32(at, bt)
  4171  		case as && !bs:
  4172  			GtSameIterSVF32(at[0], bt, bit)
  4173  		case !as && bs:
  4174  			GtSameIterVSF32(at, bt[0], ait)
  4175  		default:
  4176  			GtSameIterF32(at, bt, ait, bit)
  4177  		}
  4178  		return
  4179  	case Float64:
  4180  		at := a.Float64s()
  4181  		bt := b.Float64s()
  4182  		switch {
  4183  		case as && bs:
  4184  			GtSameF64(at, bt)
  4185  		case as && !bs:
  4186  			GtSameIterSVF64(at[0], bt, bit)
  4187  		case !as && bs:
  4188  			GtSameIterVSF64(at, bt[0], ait)
  4189  		default:
  4190  			GtSameIterF64(at, bt, ait, bit)
  4191  		}
  4192  		return
  4193  	case String:
  4194  		at := a.Strings()
  4195  		bt := b.Strings()
  4196  		switch {
  4197  		case as && bs:
  4198  			GtSameStr(at, bt)
  4199  		case as && !bs:
  4200  			GtSameIterSVStr(at[0], bt, bit)
  4201  		case !as && bs:
  4202  			GtSameIterVSStr(at, bt[0], ait)
  4203  		default:
  4204  			GtSameIterStr(at, bt, ait, bit)
  4205  		}
  4206  		return
  4207  	default:
  4208  		return errors.Errorf("Unsupported type %v for Gt", t)
  4209  	}
  4210  }
  4211  
  4212  func (e E) GteSameIter(t reflect.Type, a *storage.Header, b *storage.Header, ait Iterator, bit Iterator) (err error) {
  4213  	as := isScalar(a, t)
  4214  	bs := isScalar(b, t)
  4215  
  4216  	switch t {
  4217  	case Int:
  4218  		at := a.Ints()
  4219  		bt := b.Ints()
  4220  		switch {
  4221  		case as && bs:
  4222  			GteSameI(at, bt)
  4223  		case as && !bs:
  4224  			GteSameIterSVI(at[0], bt, bit)
  4225  		case !as && bs:
  4226  			GteSameIterVSI(at, bt[0], ait)
  4227  		default:
  4228  			GteSameIterI(at, bt, ait, bit)
  4229  		}
  4230  		return
  4231  	case Int8:
  4232  		at := a.Int8s()
  4233  		bt := b.Int8s()
  4234  		switch {
  4235  		case as && bs:
  4236  			GteSameI8(at, bt)
  4237  		case as && !bs:
  4238  			GteSameIterSVI8(at[0], bt, bit)
  4239  		case !as && bs:
  4240  			GteSameIterVSI8(at, bt[0], ait)
  4241  		default:
  4242  			GteSameIterI8(at, bt, ait, bit)
  4243  		}
  4244  		return
  4245  	case Int16:
  4246  		at := a.Int16s()
  4247  		bt := b.Int16s()
  4248  		switch {
  4249  		case as && bs:
  4250  			GteSameI16(at, bt)
  4251  		case as && !bs:
  4252  			GteSameIterSVI16(at[0], bt, bit)
  4253  		case !as && bs:
  4254  			GteSameIterVSI16(at, bt[0], ait)
  4255  		default:
  4256  			GteSameIterI16(at, bt, ait, bit)
  4257  		}
  4258  		return
  4259  	case Int32:
  4260  		at := a.Int32s()
  4261  		bt := b.Int32s()
  4262  		switch {
  4263  		case as && bs:
  4264  			GteSameI32(at, bt)
  4265  		case as && !bs:
  4266  			GteSameIterSVI32(at[0], bt, bit)
  4267  		case !as && bs:
  4268  			GteSameIterVSI32(at, bt[0], ait)
  4269  		default:
  4270  			GteSameIterI32(at, bt, ait, bit)
  4271  		}
  4272  		return
  4273  	case Int64:
  4274  		at := a.Int64s()
  4275  		bt := b.Int64s()
  4276  		switch {
  4277  		case as && bs:
  4278  			GteSameI64(at, bt)
  4279  		case as && !bs:
  4280  			GteSameIterSVI64(at[0], bt, bit)
  4281  		case !as && bs:
  4282  			GteSameIterVSI64(at, bt[0], ait)
  4283  		default:
  4284  			GteSameIterI64(at, bt, ait, bit)
  4285  		}
  4286  		return
  4287  	case Uint:
  4288  		at := a.Uints()
  4289  		bt := b.Uints()
  4290  		switch {
  4291  		case as && bs:
  4292  			GteSameU(at, bt)
  4293  		case as && !bs:
  4294  			GteSameIterSVU(at[0], bt, bit)
  4295  		case !as && bs:
  4296  			GteSameIterVSU(at, bt[0], ait)
  4297  		default:
  4298  			GteSameIterU(at, bt, ait, bit)
  4299  		}
  4300  		return
  4301  	case Uint8:
  4302  		at := a.Uint8s()
  4303  		bt := b.Uint8s()
  4304  		switch {
  4305  		case as && bs:
  4306  			GteSameU8(at, bt)
  4307  		case as && !bs:
  4308  			GteSameIterSVU8(at[0], bt, bit)
  4309  		case !as && bs:
  4310  			GteSameIterVSU8(at, bt[0], ait)
  4311  		default:
  4312  			GteSameIterU8(at, bt, ait, bit)
  4313  		}
  4314  		return
  4315  	case Uint16:
  4316  		at := a.Uint16s()
  4317  		bt := b.Uint16s()
  4318  		switch {
  4319  		case as && bs:
  4320  			GteSameU16(at, bt)
  4321  		case as && !bs:
  4322  			GteSameIterSVU16(at[0], bt, bit)
  4323  		case !as && bs:
  4324  			GteSameIterVSU16(at, bt[0], ait)
  4325  		default:
  4326  			GteSameIterU16(at, bt, ait, bit)
  4327  		}
  4328  		return
  4329  	case Uint32:
  4330  		at := a.Uint32s()
  4331  		bt := b.Uint32s()
  4332  		switch {
  4333  		case as && bs:
  4334  			GteSameU32(at, bt)
  4335  		case as && !bs:
  4336  			GteSameIterSVU32(at[0], bt, bit)
  4337  		case !as && bs:
  4338  			GteSameIterVSU32(at, bt[0], ait)
  4339  		default:
  4340  			GteSameIterU32(at, bt, ait, bit)
  4341  		}
  4342  		return
  4343  	case Uint64:
  4344  		at := a.Uint64s()
  4345  		bt := b.Uint64s()
  4346  		switch {
  4347  		case as && bs:
  4348  			GteSameU64(at, bt)
  4349  		case as && !bs:
  4350  			GteSameIterSVU64(at[0], bt, bit)
  4351  		case !as && bs:
  4352  			GteSameIterVSU64(at, bt[0], ait)
  4353  		default:
  4354  			GteSameIterU64(at, bt, ait, bit)
  4355  		}
  4356  		return
  4357  	case Float32:
  4358  		at := a.Float32s()
  4359  		bt := b.Float32s()
  4360  		switch {
  4361  		case as && bs:
  4362  			GteSameF32(at, bt)
  4363  		case as && !bs:
  4364  			GteSameIterSVF32(at[0], bt, bit)
  4365  		case !as && bs:
  4366  			GteSameIterVSF32(at, bt[0], ait)
  4367  		default:
  4368  			GteSameIterF32(at, bt, ait, bit)
  4369  		}
  4370  		return
  4371  	case Float64:
  4372  		at := a.Float64s()
  4373  		bt := b.Float64s()
  4374  		switch {
  4375  		case as && bs:
  4376  			GteSameF64(at, bt)
  4377  		case as && !bs:
  4378  			GteSameIterSVF64(at[0], bt, bit)
  4379  		case !as && bs:
  4380  			GteSameIterVSF64(at, bt[0], ait)
  4381  		default:
  4382  			GteSameIterF64(at, bt, ait, bit)
  4383  		}
  4384  		return
  4385  	case String:
  4386  		at := a.Strings()
  4387  		bt := b.Strings()
  4388  		switch {
  4389  		case as && bs:
  4390  			GteSameStr(at, bt)
  4391  		case as && !bs:
  4392  			GteSameIterSVStr(at[0], bt, bit)
  4393  		case !as && bs:
  4394  			GteSameIterVSStr(at, bt[0], ait)
  4395  		default:
  4396  			GteSameIterStr(at, bt, ait, bit)
  4397  		}
  4398  		return
  4399  	default:
  4400  		return errors.Errorf("Unsupported type %v for Gte", t)
  4401  	}
  4402  }
  4403  
  4404  func (e E) LtSameIter(t reflect.Type, a *storage.Header, b *storage.Header, ait Iterator, bit Iterator) (err error) {
  4405  	as := isScalar(a, t)
  4406  	bs := isScalar(b, t)
  4407  
  4408  	switch t {
  4409  	case Int:
  4410  		at := a.Ints()
  4411  		bt := b.Ints()
  4412  		switch {
  4413  		case as && bs:
  4414  			LtSameI(at, bt)
  4415  		case as && !bs:
  4416  			LtSameIterSVI(at[0], bt, bit)
  4417  		case !as && bs:
  4418  			LtSameIterVSI(at, bt[0], ait)
  4419  		default:
  4420  			LtSameIterI(at, bt, ait, bit)
  4421  		}
  4422  		return
  4423  	case Int8:
  4424  		at := a.Int8s()
  4425  		bt := b.Int8s()
  4426  		switch {
  4427  		case as && bs:
  4428  			LtSameI8(at, bt)
  4429  		case as && !bs:
  4430  			LtSameIterSVI8(at[0], bt, bit)
  4431  		case !as && bs:
  4432  			LtSameIterVSI8(at, bt[0], ait)
  4433  		default:
  4434  			LtSameIterI8(at, bt, ait, bit)
  4435  		}
  4436  		return
  4437  	case Int16:
  4438  		at := a.Int16s()
  4439  		bt := b.Int16s()
  4440  		switch {
  4441  		case as && bs:
  4442  			LtSameI16(at, bt)
  4443  		case as && !bs:
  4444  			LtSameIterSVI16(at[0], bt, bit)
  4445  		case !as && bs:
  4446  			LtSameIterVSI16(at, bt[0], ait)
  4447  		default:
  4448  			LtSameIterI16(at, bt, ait, bit)
  4449  		}
  4450  		return
  4451  	case Int32:
  4452  		at := a.Int32s()
  4453  		bt := b.Int32s()
  4454  		switch {
  4455  		case as && bs:
  4456  			LtSameI32(at, bt)
  4457  		case as && !bs:
  4458  			LtSameIterSVI32(at[0], bt, bit)
  4459  		case !as && bs:
  4460  			LtSameIterVSI32(at, bt[0], ait)
  4461  		default:
  4462  			LtSameIterI32(at, bt, ait, bit)
  4463  		}
  4464  		return
  4465  	case Int64:
  4466  		at := a.Int64s()
  4467  		bt := b.Int64s()
  4468  		switch {
  4469  		case as && bs:
  4470  			LtSameI64(at, bt)
  4471  		case as && !bs:
  4472  			LtSameIterSVI64(at[0], bt, bit)
  4473  		case !as && bs:
  4474  			LtSameIterVSI64(at, bt[0], ait)
  4475  		default:
  4476  			LtSameIterI64(at, bt, ait, bit)
  4477  		}
  4478  		return
  4479  	case Uint:
  4480  		at := a.Uints()
  4481  		bt := b.Uints()
  4482  		switch {
  4483  		case as && bs:
  4484  			LtSameU(at, bt)
  4485  		case as && !bs:
  4486  			LtSameIterSVU(at[0], bt, bit)
  4487  		case !as && bs:
  4488  			LtSameIterVSU(at, bt[0], ait)
  4489  		default:
  4490  			LtSameIterU(at, bt, ait, bit)
  4491  		}
  4492  		return
  4493  	case Uint8:
  4494  		at := a.Uint8s()
  4495  		bt := b.Uint8s()
  4496  		switch {
  4497  		case as && bs:
  4498  			LtSameU8(at, bt)
  4499  		case as && !bs:
  4500  			LtSameIterSVU8(at[0], bt, bit)
  4501  		case !as && bs:
  4502  			LtSameIterVSU8(at, bt[0], ait)
  4503  		default:
  4504  			LtSameIterU8(at, bt, ait, bit)
  4505  		}
  4506  		return
  4507  	case Uint16:
  4508  		at := a.Uint16s()
  4509  		bt := b.Uint16s()
  4510  		switch {
  4511  		case as && bs:
  4512  			LtSameU16(at, bt)
  4513  		case as && !bs:
  4514  			LtSameIterSVU16(at[0], bt, bit)
  4515  		case !as && bs:
  4516  			LtSameIterVSU16(at, bt[0], ait)
  4517  		default:
  4518  			LtSameIterU16(at, bt, ait, bit)
  4519  		}
  4520  		return
  4521  	case Uint32:
  4522  		at := a.Uint32s()
  4523  		bt := b.Uint32s()
  4524  		switch {
  4525  		case as && bs:
  4526  			LtSameU32(at, bt)
  4527  		case as && !bs:
  4528  			LtSameIterSVU32(at[0], bt, bit)
  4529  		case !as && bs:
  4530  			LtSameIterVSU32(at, bt[0], ait)
  4531  		default:
  4532  			LtSameIterU32(at, bt, ait, bit)
  4533  		}
  4534  		return
  4535  	case Uint64:
  4536  		at := a.Uint64s()
  4537  		bt := b.Uint64s()
  4538  		switch {
  4539  		case as && bs:
  4540  			LtSameU64(at, bt)
  4541  		case as && !bs:
  4542  			LtSameIterSVU64(at[0], bt, bit)
  4543  		case !as && bs:
  4544  			LtSameIterVSU64(at, bt[0], ait)
  4545  		default:
  4546  			LtSameIterU64(at, bt, ait, bit)
  4547  		}
  4548  		return
  4549  	case Float32:
  4550  		at := a.Float32s()
  4551  		bt := b.Float32s()
  4552  		switch {
  4553  		case as && bs:
  4554  			LtSameF32(at, bt)
  4555  		case as && !bs:
  4556  			LtSameIterSVF32(at[0], bt, bit)
  4557  		case !as && bs:
  4558  			LtSameIterVSF32(at, bt[0], ait)
  4559  		default:
  4560  			LtSameIterF32(at, bt, ait, bit)
  4561  		}
  4562  		return
  4563  	case Float64:
  4564  		at := a.Float64s()
  4565  		bt := b.Float64s()
  4566  		switch {
  4567  		case as && bs:
  4568  			LtSameF64(at, bt)
  4569  		case as && !bs:
  4570  			LtSameIterSVF64(at[0], bt, bit)
  4571  		case !as && bs:
  4572  			LtSameIterVSF64(at, bt[0], ait)
  4573  		default:
  4574  			LtSameIterF64(at, bt, ait, bit)
  4575  		}
  4576  		return
  4577  	case String:
  4578  		at := a.Strings()
  4579  		bt := b.Strings()
  4580  		switch {
  4581  		case as && bs:
  4582  			LtSameStr(at, bt)
  4583  		case as && !bs:
  4584  			LtSameIterSVStr(at[0], bt, bit)
  4585  		case !as && bs:
  4586  			LtSameIterVSStr(at, bt[0], ait)
  4587  		default:
  4588  			LtSameIterStr(at, bt, ait, bit)
  4589  		}
  4590  		return
  4591  	default:
  4592  		return errors.Errorf("Unsupported type %v for Lt", t)
  4593  	}
  4594  }
  4595  
  4596  func (e E) LteSameIter(t reflect.Type, a *storage.Header, b *storage.Header, ait Iterator, bit Iterator) (err error) {
  4597  	as := isScalar(a, t)
  4598  	bs := isScalar(b, t)
  4599  
  4600  	switch t {
  4601  	case Int:
  4602  		at := a.Ints()
  4603  		bt := b.Ints()
  4604  		switch {
  4605  		case as && bs:
  4606  			LteSameI(at, bt)
  4607  		case as && !bs:
  4608  			LteSameIterSVI(at[0], bt, bit)
  4609  		case !as && bs:
  4610  			LteSameIterVSI(at, bt[0], ait)
  4611  		default:
  4612  			LteSameIterI(at, bt, ait, bit)
  4613  		}
  4614  		return
  4615  	case Int8:
  4616  		at := a.Int8s()
  4617  		bt := b.Int8s()
  4618  		switch {
  4619  		case as && bs:
  4620  			LteSameI8(at, bt)
  4621  		case as && !bs:
  4622  			LteSameIterSVI8(at[0], bt, bit)
  4623  		case !as && bs:
  4624  			LteSameIterVSI8(at, bt[0], ait)
  4625  		default:
  4626  			LteSameIterI8(at, bt, ait, bit)
  4627  		}
  4628  		return
  4629  	case Int16:
  4630  		at := a.Int16s()
  4631  		bt := b.Int16s()
  4632  		switch {
  4633  		case as && bs:
  4634  			LteSameI16(at, bt)
  4635  		case as && !bs:
  4636  			LteSameIterSVI16(at[0], bt, bit)
  4637  		case !as && bs:
  4638  			LteSameIterVSI16(at, bt[0], ait)
  4639  		default:
  4640  			LteSameIterI16(at, bt, ait, bit)
  4641  		}
  4642  		return
  4643  	case Int32:
  4644  		at := a.Int32s()
  4645  		bt := b.Int32s()
  4646  		switch {
  4647  		case as && bs:
  4648  			LteSameI32(at, bt)
  4649  		case as && !bs:
  4650  			LteSameIterSVI32(at[0], bt, bit)
  4651  		case !as && bs:
  4652  			LteSameIterVSI32(at, bt[0], ait)
  4653  		default:
  4654  			LteSameIterI32(at, bt, ait, bit)
  4655  		}
  4656  		return
  4657  	case Int64:
  4658  		at := a.Int64s()
  4659  		bt := b.Int64s()
  4660  		switch {
  4661  		case as && bs:
  4662  			LteSameI64(at, bt)
  4663  		case as && !bs:
  4664  			LteSameIterSVI64(at[0], bt, bit)
  4665  		case !as && bs:
  4666  			LteSameIterVSI64(at, bt[0], ait)
  4667  		default:
  4668  			LteSameIterI64(at, bt, ait, bit)
  4669  		}
  4670  		return
  4671  	case Uint:
  4672  		at := a.Uints()
  4673  		bt := b.Uints()
  4674  		switch {
  4675  		case as && bs:
  4676  			LteSameU(at, bt)
  4677  		case as && !bs:
  4678  			LteSameIterSVU(at[0], bt, bit)
  4679  		case !as && bs:
  4680  			LteSameIterVSU(at, bt[0], ait)
  4681  		default:
  4682  			LteSameIterU(at, bt, ait, bit)
  4683  		}
  4684  		return
  4685  	case Uint8:
  4686  		at := a.Uint8s()
  4687  		bt := b.Uint8s()
  4688  		switch {
  4689  		case as && bs:
  4690  			LteSameU8(at, bt)
  4691  		case as && !bs:
  4692  			LteSameIterSVU8(at[0], bt, bit)
  4693  		case !as && bs:
  4694  			LteSameIterVSU8(at, bt[0], ait)
  4695  		default:
  4696  			LteSameIterU8(at, bt, ait, bit)
  4697  		}
  4698  		return
  4699  	case Uint16:
  4700  		at := a.Uint16s()
  4701  		bt := b.Uint16s()
  4702  		switch {
  4703  		case as && bs:
  4704  			LteSameU16(at, bt)
  4705  		case as && !bs:
  4706  			LteSameIterSVU16(at[0], bt, bit)
  4707  		case !as && bs:
  4708  			LteSameIterVSU16(at, bt[0], ait)
  4709  		default:
  4710  			LteSameIterU16(at, bt, ait, bit)
  4711  		}
  4712  		return
  4713  	case Uint32:
  4714  		at := a.Uint32s()
  4715  		bt := b.Uint32s()
  4716  		switch {
  4717  		case as && bs:
  4718  			LteSameU32(at, bt)
  4719  		case as && !bs:
  4720  			LteSameIterSVU32(at[0], bt, bit)
  4721  		case !as && bs:
  4722  			LteSameIterVSU32(at, bt[0], ait)
  4723  		default:
  4724  			LteSameIterU32(at, bt, ait, bit)
  4725  		}
  4726  		return
  4727  	case Uint64:
  4728  		at := a.Uint64s()
  4729  		bt := b.Uint64s()
  4730  		switch {
  4731  		case as && bs:
  4732  			LteSameU64(at, bt)
  4733  		case as && !bs:
  4734  			LteSameIterSVU64(at[0], bt, bit)
  4735  		case !as && bs:
  4736  			LteSameIterVSU64(at, bt[0], ait)
  4737  		default:
  4738  			LteSameIterU64(at, bt, ait, bit)
  4739  		}
  4740  		return
  4741  	case Float32:
  4742  		at := a.Float32s()
  4743  		bt := b.Float32s()
  4744  		switch {
  4745  		case as && bs:
  4746  			LteSameF32(at, bt)
  4747  		case as && !bs:
  4748  			LteSameIterSVF32(at[0], bt, bit)
  4749  		case !as && bs:
  4750  			LteSameIterVSF32(at, bt[0], ait)
  4751  		default:
  4752  			LteSameIterF32(at, bt, ait, bit)
  4753  		}
  4754  		return
  4755  	case Float64:
  4756  		at := a.Float64s()
  4757  		bt := b.Float64s()
  4758  		switch {
  4759  		case as && bs:
  4760  			LteSameF64(at, bt)
  4761  		case as && !bs:
  4762  			LteSameIterSVF64(at[0], bt, bit)
  4763  		case !as && bs:
  4764  			LteSameIterVSF64(at, bt[0], ait)
  4765  		default:
  4766  			LteSameIterF64(at, bt, ait, bit)
  4767  		}
  4768  		return
  4769  	case String:
  4770  		at := a.Strings()
  4771  		bt := b.Strings()
  4772  		switch {
  4773  		case as && bs:
  4774  			LteSameStr(at, bt)
  4775  		case as && !bs:
  4776  			LteSameIterSVStr(at[0], bt, bit)
  4777  		case !as && bs:
  4778  			LteSameIterVSStr(at, bt[0], ait)
  4779  		default:
  4780  			LteSameIterStr(at, bt, ait, bit)
  4781  		}
  4782  		return
  4783  	default:
  4784  		return errors.Errorf("Unsupported type %v for Lte", t)
  4785  	}
  4786  }
  4787  
  4788  func (e E) EqSameIter(t reflect.Type, a *storage.Header, b *storage.Header, ait Iterator, bit Iterator) (err error) {
  4789  	as := isScalar(a, t)
  4790  	bs := isScalar(b, t)
  4791  
  4792  	switch t {
  4793  	case Bool:
  4794  		at := a.Bools()
  4795  		bt := b.Bools()
  4796  		switch {
  4797  		case as && bs:
  4798  			EqSameB(at, bt)
  4799  		case as && !bs:
  4800  			EqSameIterSVB(at[0], bt, bit)
  4801  		case !as && bs:
  4802  			EqSameIterVSB(at, bt[0], ait)
  4803  		default:
  4804  			EqSameIterB(at, bt, ait, bit)
  4805  		}
  4806  		return
  4807  	case Int:
  4808  		at := a.Ints()
  4809  		bt := b.Ints()
  4810  		switch {
  4811  		case as && bs:
  4812  			EqSameI(at, bt)
  4813  		case as && !bs:
  4814  			EqSameIterSVI(at[0], bt, bit)
  4815  		case !as && bs:
  4816  			EqSameIterVSI(at, bt[0], ait)
  4817  		default:
  4818  			EqSameIterI(at, bt, ait, bit)
  4819  		}
  4820  		return
  4821  	case Int8:
  4822  		at := a.Int8s()
  4823  		bt := b.Int8s()
  4824  		switch {
  4825  		case as && bs:
  4826  			EqSameI8(at, bt)
  4827  		case as && !bs:
  4828  			EqSameIterSVI8(at[0], bt, bit)
  4829  		case !as && bs:
  4830  			EqSameIterVSI8(at, bt[0], ait)
  4831  		default:
  4832  			EqSameIterI8(at, bt, ait, bit)
  4833  		}
  4834  		return
  4835  	case Int16:
  4836  		at := a.Int16s()
  4837  		bt := b.Int16s()
  4838  		switch {
  4839  		case as && bs:
  4840  			EqSameI16(at, bt)
  4841  		case as && !bs:
  4842  			EqSameIterSVI16(at[0], bt, bit)
  4843  		case !as && bs:
  4844  			EqSameIterVSI16(at, bt[0], ait)
  4845  		default:
  4846  			EqSameIterI16(at, bt, ait, bit)
  4847  		}
  4848  		return
  4849  	case Int32:
  4850  		at := a.Int32s()
  4851  		bt := b.Int32s()
  4852  		switch {
  4853  		case as && bs:
  4854  			EqSameI32(at, bt)
  4855  		case as && !bs:
  4856  			EqSameIterSVI32(at[0], bt, bit)
  4857  		case !as && bs:
  4858  			EqSameIterVSI32(at, bt[0], ait)
  4859  		default:
  4860  			EqSameIterI32(at, bt, ait, bit)
  4861  		}
  4862  		return
  4863  	case Int64:
  4864  		at := a.Int64s()
  4865  		bt := b.Int64s()
  4866  		switch {
  4867  		case as && bs:
  4868  			EqSameI64(at, bt)
  4869  		case as && !bs:
  4870  			EqSameIterSVI64(at[0], bt, bit)
  4871  		case !as && bs:
  4872  			EqSameIterVSI64(at, bt[0], ait)
  4873  		default:
  4874  			EqSameIterI64(at, bt, ait, bit)
  4875  		}
  4876  		return
  4877  	case Uint:
  4878  		at := a.Uints()
  4879  		bt := b.Uints()
  4880  		switch {
  4881  		case as && bs:
  4882  			EqSameU(at, bt)
  4883  		case as && !bs:
  4884  			EqSameIterSVU(at[0], bt, bit)
  4885  		case !as && bs:
  4886  			EqSameIterVSU(at, bt[0], ait)
  4887  		default:
  4888  			EqSameIterU(at, bt, ait, bit)
  4889  		}
  4890  		return
  4891  	case Uint8:
  4892  		at := a.Uint8s()
  4893  		bt := b.Uint8s()
  4894  		switch {
  4895  		case as && bs:
  4896  			EqSameU8(at, bt)
  4897  		case as && !bs:
  4898  			EqSameIterSVU8(at[0], bt, bit)
  4899  		case !as && bs:
  4900  			EqSameIterVSU8(at, bt[0], ait)
  4901  		default:
  4902  			EqSameIterU8(at, bt, ait, bit)
  4903  		}
  4904  		return
  4905  	case Uint16:
  4906  		at := a.Uint16s()
  4907  		bt := b.Uint16s()
  4908  		switch {
  4909  		case as && bs:
  4910  			EqSameU16(at, bt)
  4911  		case as && !bs:
  4912  			EqSameIterSVU16(at[0], bt, bit)
  4913  		case !as && bs:
  4914  			EqSameIterVSU16(at, bt[0], ait)
  4915  		default:
  4916  			EqSameIterU16(at, bt, ait, bit)
  4917  		}
  4918  		return
  4919  	case Uint32:
  4920  		at := a.Uint32s()
  4921  		bt := b.Uint32s()
  4922  		switch {
  4923  		case as && bs:
  4924  			EqSameU32(at, bt)
  4925  		case as && !bs:
  4926  			EqSameIterSVU32(at[0], bt, bit)
  4927  		case !as && bs:
  4928  			EqSameIterVSU32(at, bt[0], ait)
  4929  		default:
  4930  			EqSameIterU32(at, bt, ait, bit)
  4931  		}
  4932  		return
  4933  	case Uint64:
  4934  		at := a.Uint64s()
  4935  		bt := b.Uint64s()
  4936  		switch {
  4937  		case as && bs:
  4938  			EqSameU64(at, bt)
  4939  		case as && !bs:
  4940  			EqSameIterSVU64(at[0], bt, bit)
  4941  		case !as && bs:
  4942  			EqSameIterVSU64(at, bt[0], ait)
  4943  		default:
  4944  			EqSameIterU64(at, bt, ait, bit)
  4945  		}
  4946  		return
  4947  	case Uintptr:
  4948  		at := a.Uintptrs()
  4949  		bt := b.Uintptrs()
  4950  		switch {
  4951  		case as && bs:
  4952  			EqSameUintptr(at, bt)
  4953  		case as && !bs:
  4954  			EqSameIterSVUintptr(at[0], bt, bit)
  4955  		case !as && bs:
  4956  			EqSameIterVSUintptr(at, bt[0], ait)
  4957  		default:
  4958  			EqSameIterUintptr(at, bt, ait, bit)
  4959  		}
  4960  		return
  4961  	case Float32:
  4962  		at := a.Float32s()
  4963  		bt := b.Float32s()
  4964  		switch {
  4965  		case as && bs:
  4966  			EqSameF32(at, bt)
  4967  		case as && !bs:
  4968  			EqSameIterSVF32(at[0], bt, bit)
  4969  		case !as && bs:
  4970  			EqSameIterVSF32(at, bt[0], ait)
  4971  		default:
  4972  			EqSameIterF32(at, bt, ait, bit)
  4973  		}
  4974  		return
  4975  	case Float64:
  4976  		at := a.Float64s()
  4977  		bt := b.Float64s()
  4978  		switch {
  4979  		case as && bs:
  4980  			EqSameF64(at, bt)
  4981  		case as && !bs:
  4982  			EqSameIterSVF64(at[0], bt, bit)
  4983  		case !as && bs:
  4984  			EqSameIterVSF64(at, bt[0], ait)
  4985  		default:
  4986  			EqSameIterF64(at, bt, ait, bit)
  4987  		}
  4988  		return
  4989  	case Complex64:
  4990  		at := a.Complex64s()
  4991  		bt := b.Complex64s()
  4992  		switch {
  4993  		case as && bs:
  4994  			EqSameC64(at, bt)
  4995  		case as && !bs:
  4996  			EqSameIterSVC64(at[0], bt, bit)
  4997  		case !as && bs:
  4998  			EqSameIterVSC64(at, bt[0], ait)
  4999  		default:
  5000  			EqSameIterC64(at, bt, ait, bit)
  5001  		}
  5002  		return
  5003  	case Complex128:
  5004  		at := a.Complex128s()
  5005  		bt := b.Complex128s()
  5006  		switch {
  5007  		case as && bs:
  5008  			EqSameC128(at, bt)
  5009  		case as && !bs:
  5010  			EqSameIterSVC128(at[0], bt, bit)
  5011  		case !as && bs:
  5012  			EqSameIterVSC128(at, bt[0], ait)
  5013  		default:
  5014  			EqSameIterC128(at, bt, ait, bit)
  5015  		}
  5016  		return
  5017  	case String:
  5018  		at := a.Strings()
  5019  		bt := b.Strings()
  5020  		switch {
  5021  		case as && bs:
  5022  			EqSameStr(at, bt)
  5023  		case as && !bs:
  5024  			EqSameIterSVStr(at[0], bt, bit)
  5025  		case !as && bs:
  5026  			EqSameIterVSStr(at, bt[0], ait)
  5027  		default:
  5028  			EqSameIterStr(at, bt, ait, bit)
  5029  		}
  5030  		return
  5031  	default:
  5032  		return errors.Errorf("Unsupported type %v for Eq", t)
  5033  	}
  5034  }
  5035  
  5036  func (e E) NeSameIter(t reflect.Type, a *storage.Header, b *storage.Header, ait Iterator, bit Iterator) (err error) {
  5037  	as := isScalar(a, t)
  5038  	bs := isScalar(b, t)
  5039  
  5040  	switch t {
  5041  	case Bool:
  5042  		at := a.Bools()
  5043  		bt := b.Bools()
  5044  		switch {
  5045  		case as && bs:
  5046  			NeSameB(at, bt)
  5047  		case as && !bs:
  5048  			NeSameIterSVB(at[0], bt, bit)
  5049  		case !as && bs:
  5050  			NeSameIterVSB(at, bt[0], ait)
  5051  		default:
  5052  			NeSameIterB(at, bt, ait, bit)
  5053  		}
  5054  		return
  5055  	case Int:
  5056  		at := a.Ints()
  5057  		bt := b.Ints()
  5058  		switch {
  5059  		case as && bs:
  5060  			NeSameI(at, bt)
  5061  		case as && !bs:
  5062  			NeSameIterSVI(at[0], bt, bit)
  5063  		case !as && bs:
  5064  			NeSameIterVSI(at, bt[0], ait)
  5065  		default:
  5066  			NeSameIterI(at, bt, ait, bit)
  5067  		}
  5068  		return
  5069  	case Int8:
  5070  		at := a.Int8s()
  5071  		bt := b.Int8s()
  5072  		switch {
  5073  		case as && bs:
  5074  			NeSameI8(at, bt)
  5075  		case as && !bs:
  5076  			NeSameIterSVI8(at[0], bt, bit)
  5077  		case !as && bs:
  5078  			NeSameIterVSI8(at, bt[0], ait)
  5079  		default:
  5080  			NeSameIterI8(at, bt, ait, bit)
  5081  		}
  5082  		return
  5083  	case Int16:
  5084  		at := a.Int16s()
  5085  		bt := b.Int16s()
  5086  		switch {
  5087  		case as && bs:
  5088  			NeSameI16(at, bt)
  5089  		case as && !bs:
  5090  			NeSameIterSVI16(at[0], bt, bit)
  5091  		case !as && bs:
  5092  			NeSameIterVSI16(at, bt[0], ait)
  5093  		default:
  5094  			NeSameIterI16(at, bt, ait, bit)
  5095  		}
  5096  		return
  5097  	case Int32:
  5098  		at := a.Int32s()
  5099  		bt := b.Int32s()
  5100  		switch {
  5101  		case as && bs:
  5102  			NeSameI32(at, bt)
  5103  		case as && !bs:
  5104  			NeSameIterSVI32(at[0], bt, bit)
  5105  		case !as && bs:
  5106  			NeSameIterVSI32(at, bt[0], ait)
  5107  		default:
  5108  			NeSameIterI32(at, bt, ait, bit)
  5109  		}
  5110  		return
  5111  	case Int64:
  5112  		at := a.Int64s()
  5113  		bt := b.Int64s()
  5114  		switch {
  5115  		case as && bs:
  5116  			NeSameI64(at, bt)
  5117  		case as && !bs:
  5118  			NeSameIterSVI64(at[0], bt, bit)
  5119  		case !as && bs:
  5120  			NeSameIterVSI64(at, bt[0], ait)
  5121  		default:
  5122  			NeSameIterI64(at, bt, ait, bit)
  5123  		}
  5124  		return
  5125  	case Uint:
  5126  		at := a.Uints()
  5127  		bt := b.Uints()
  5128  		switch {
  5129  		case as && bs:
  5130  			NeSameU(at, bt)
  5131  		case as && !bs:
  5132  			NeSameIterSVU(at[0], bt, bit)
  5133  		case !as && bs:
  5134  			NeSameIterVSU(at, bt[0], ait)
  5135  		default:
  5136  			NeSameIterU(at, bt, ait, bit)
  5137  		}
  5138  		return
  5139  	case Uint8:
  5140  		at := a.Uint8s()
  5141  		bt := b.Uint8s()
  5142  		switch {
  5143  		case as && bs:
  5144  			NeSameU8(at, bt)
  5145  		case as && !bs:
  5146  			NeSameIterSVU8(at[0], bt, bit)
  5147  		case !as && bs:
  5148  			NeSameIterVSU8(at, bt[0], ait)
  5149  		default:
  5150  			NeSameIterU8(at, bt, ait, bit)
  5151  		}
  5152  		return
  5153  	case Uint16:
  5154  		at := a.Uint16s()
  5155  		bt := b.Uint16s()
  5156  		switch {
  5157  		case as && bs:
  5158  			NeSameU16(at, bt)
  5159  		case as && !bs:
  5160  			NeSameIterSVU16(at[0], bt, bit)
  5161  		case !as && bs:
  5162  			NeSameIterVSU16(at, bt[0], ait)
  5163  		default:
  5164  			NeSameIterU16(at, bt, ait, bit)
  5165  		}
  5166  		return
  5167  	case Uint32:
  5168  		at := a.Uint32s()
  5169  		bt := b.Uint32s()
  5170  		switch {
  5171  		case as && bs:
  5172  			NeSameU32(at, bt)
  5173  		case as && !bs:
  5174  			NeSameIterSVU32(at[0], bt, bit)
  5175  		case !as && bs:
  5176  			NeSameIterVSU32(at, bt[0], ait)
  5177  		default:
  5178  			NeSameIterU32(at, bt, ait, bit)
  5179  		}
  5180  		return
  5181  	case Uint64:
  5182  		at := a.Uint64s()
  5183  		bt := b.Uint64s()
  5184  		switch {
  5185  		case as && bs:
  5186  			NeSameU64(at, bt)
  5187  		case as && !bs:
  5188  			NeSameIterSVU64(at[0], bt, bit)
  5189  		case !as && bs:
  5190  			NeSameIterVSU64(at, bt[0], ait)
  5191  		default:
  5192  			NeSameIterU64(at, bt, ait, bit)
  5193  		}
  5194  		return
  5195  	case Uintptr:
  5196  		at := a.Uintptrs()
  5197  		bt := b.Uintptrs()
  5198  		switch {
  5199  		case as && bs:
  5200  			NeSameUintptr(at, bt)
  5201  		case as && !bs:
  5202  			NeSameIterSVUintptr(at[0], bt, bit)
  5203  		case !as && bs:
  5204  			NeSameIterVSUintptr(at, bt[0], ait)
  5205  		default:
  5206  			NeSameIterUintptr(at, bt, ait, bit)
  5207  		}
  5208  		return
  5209  	case Float32:
  5210  		at := a.Float32s()
  5211  		bt := b.Float32s()
  5212  		switch {
  5213  		case as && bs:
  5214  			NeSameF32(at, bt)
  5215  		case as && !bs:
  5216  			NeSameIterSVF32(at[0], bt, bit)
  5217  		case !as && bs:
  5218  			NeSameIterVSF32(at, bt[0], ait)
  5219  		default:
  5220  			NeSameIterF32(at, bt, ait, bit)
  5221  		}
  5222  		return
  5223  	case Float64:
  5224  		at := a.Float64s()
  5225  		bt := b.Float64s()
  5226  		switch {
  5227  		case as && bs:
  5228  			NeSameF64(at, bt)
  5229  		case as && !bs:
  5230  			NeSameIterSVF64(at[0], bt, bit)
  5231  		case !as && bs:
  5232  			NeSameIterVSF64(at, bt[0], ait)
  5233  		default:
  5234  			NeSameIterF64(at, bt, ait, bit)
  5235  		}
  5236  		return
  5237  	case Complex64:
  5238  		at := a.Complex64s()
  5239  		bt := b.Complex64s()
  5240  		switch {
  5241  		case as && bs:
  5242  			NeSameC64(at, bt)
  5243  		case as && !bs:
  5244  			NeSameIterSVC64(at[0], bt, bit)
  5245  		case !as && bs:
  5246  			NeSameIterVSC64(at, bt[0], ait)
  5247  		default:
  5248  			NeSameIterC64(at, bt, ait, bit)
  5249  		}
  5250  		return
  5251  	case Complex128:
  5252  		at := a.Complex128s()
  5253  		bt := b.Complex128s()
  5254  		switch {
  5255  		case as && bs:
  5256  			NeSameC128(at, bt)
  5257  		case as && !bs:
  5258  			NeSameIterSVC128(at[0], bt, bit)
  5259  		case !as && bs:
  5260  			NeSameIterVSC128(at, bt[0], ait)
  5261  		default:
  5262  			NeSameIterC128(at, bt, ait, bit)
  5263  		}
  5264  		return
  5265  	case String:
  5266  		at := a.Strings()
  5267  		bt := b.Strings()
  5268  		switch {
  5269  		case as && bs:
  5270  			NeSameStr(at, bt)
  5271  		case as && !bs:
  5272  			NeSameIterSVStr(at[0], bt, bit)
  5273  		case !as && bs:
  5274  			NeSameIterVSStr(at, bt[0], ait)
  5275  		default:
  5276  			NeSameIterStr(at, bt, ait, bit)
  5277  		}
  5278  		return
  5279  	default:
  5280  		return errors.Errorf("Unsupported type %v for Ne", t)
  5281  	}
  5282  }