...

Source file src/math/big/arith_decl_pure.go

Documentation: math/big

     1  // Copyright 2015 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build math_big_pure_go
     6  
     7  package big
     8  
     9  func addVV(z, x, y []Word) (c Word) {
    10  	return addVV_g(z, x, y)
    11  }
    12  
    13  func subVV(z, x, y []Word) (c Word) {
    14  	return subVV_g(z, x, y)
    15  }
    16  
    17  func addVW(z, x []Word, y Word) (c Word) {
    18  	// TODO: remove indirect function call when golang.org/issue/30548 is fixed
    19  	fn := addVW_g
    20  	if len(z) > 32 {
    21  		fn = addVWlarge
    22  	}
    23  	return fn(z, x, y)
    24  }
    25  
    26  func subVW(z, x []Word, y Word) (c Word) {
    27  	// TODO: remove indirect function call when golang.org/issue/30548 is fixed
    28  	fn := subVW_g
    29  	if len(z) > 32 {
    30  		fn = subVWlarge
    31  	}
    32  	return fn(z, x, y)
    33  }
    34  
    35  func shlVU(z, x []Word, s uint) (c Word) {
    36  	return shlVU_g(z, x, s)
    37  }
    38  
    39  func shrVU(z, x []Word, s uint) (c Word) {
    40  	return shrVU_g(z, x, s)
    41  }
    42  
    43  func mulAddVWW(z, x []Word, y, r Word) (c Word) {
    44  	return mulAddVWW_g(z, x, y, r)
    45  }
    46  
    47  func addMulVVW(z, x []Word, y Word) (c Word) {
    48  	return addMulVVW_g(z, x, y)
    49  }
    50  

View as plain text