fp

package
v0.0.0-...-3948e75 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2020 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func API

func API(cfg Config) ([]byte, error)

func Package

func Package(cfg Config) (gen.Files, error)

Types

type Asm

type Asm struct {
	// contains filtered or unexported fields
}

func NewAsm

func NewAsm(cfg Config) *Asm

func (Asm) Add

func (a Asm) Add()

func (Asm) CMov

func (a Asm) CMov()

func (Asm) Context

func (a Asm) Context() *build.Context

func (Asm) Function

func (a Asm) Function(name string, params ...string)

func (Asm) Mul

func (a Asm) Mul()

func (Asm) Sqr

func (a Asm) Sqr()

func (Asm) Sub

func (a Asm) Sub()

type Config

type Config struct {
	Field        fp.Field
	InverseChain *ir.Program

	PackageName     string
	ElementTypeName string
	FilenamePrefix  string

	name.Scheme
}

func (Config) Montgomery

func (c Config) Montgomery() bool

Montgomery reports whether this is a montgomery field. Fields implemented this way require encoding and decoding before field operations.

func (Config) Param

func (c Config) Param(name string) *types.Var

func (Config) Params

func (c Config) Params(params ...string) []*types.Var

func (Config) PointerType

func (c Config) PointerType() *types.Pointer

func (Config) Signature

func (c Config) Signature(params ...string) *types.Signature

func (Config) Type

func (c Config) Type() *types.Named

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL