gorgonia.org/gorgonia@v0.9.17/operatorPointwise_unary_gen.go (about)

     1  package gorgonia
     2  
     3  // Code generated by genapi, which is a API generation tool for Gorgonia. DO NOT EDIT.
     4  
     5  func (f *sf32UnaryOperator) unaryOpType() ʘUnaryOperatorType {
     6  
     7  	switch f {
     8  	case &absf32:
     9  		return absOpType
    10  	case &signf32:
    11  		return signOpType
    12  	case &ceilf32:
    13  		return ceilOpType
    14  	case &floorf32:
    15  		return floorOpType
    16  	case &sinf32:
    17  		return sinOpType
    18  	case &cosf32:
    19  		return cosOpType
    20  	case &expf32:
    21  		return expOpType
    22  	case &lnf32:
    23  		return lnOpType
    24  	case &log2f32:
    25  		return log2OpType
    26  	case &negf32:
    27  		return negOpType
    28  	case &squaref32:
    29  		return squareOpType
    30  	case &sqrtf32:
    31  		return sqrtOpType
    32  	case &inversef32:
    33  		return inverseOpType
    34  	case &inverseSqrtf32:
    35  		return inverseSqrtOpType
    36  	case &cubef32:
    37  		return cubeOpType
    38  	case &tanhf32:
    39  		return tanhOpType
    40  	case &sigmoidf32:
    41  		return sigmoidOpType
    42  	case &log1pf32:
    43  		return log1pOpType
    44  	case &expm1f32:
    45  		return expm1OpType
    46  	case &softplusf32:
    47  		return softplusOpType
    48  	}
    49  	return maxʘUnaryOperator
    50  }
    51  func (f *sf32UnaryOperator) String() string { return f.unaryOpType().String() }
    52  
    53  func (f *sf64UnaryOperator) unaryOpType() ʘUnaryOperatorType {
    54  
    55  	switch f {
    56  	case &absf64:
    57  		return absOpType
    58  	case &signf64:
    59  		return signOpType
    60  	case &ceilf64:
    61  		return ceilOpType
    62  	case &floorf64:
    63  		return floorOpType
    64  	case &sinf64:
    65  		return sinOpType
    66  	case &cosf64:
    67  		return cosOpType
    68  	case &expf64:
    69  		return expOpType
    70  	case &lnf64:
    71  		return lnOpType
    72  	case &log2f64:
    73  		return log2OpType
    74  	case &negf64:
    75  		return negOpType
    76  	case &squaref64:
    77  		return squareOpType
    78  	case &sqrtf64:
    79  		return sqrtOpType
    80  	case &inversef64:
    81  		return inverseOpType
    82  	case &inverseSqrtf64:
    83  		return inverseSqrtOpType
    84  	case &cubef64:
    85  		return cubeOpType
    86  	case &tanhf64:
    87  		return tanhOpType
    88  	case &sigmoidf64:
    89  		return sigmoidOpType
    90  	case &log1pf64:
    91  		return log1pOpType
    92  	case &expm1f64:
    93  		return expm1OpType
    94  	case &softplusf64:
    95  		return softplusOpType
    96  	}
    97  	return maxʘUnaryOperator
    98  }
    99  func (f *sf64UnaryOperator) String() string { return f.unaryOpType().String() }