Documentation ¶
Index ¶
- Variables
- func CastType(n *BMNumber, t BMNumberType) error
- func EventuallyCreateType(name string, param interface{}) (bool, error)
- func ListTypes()
- func LoadLinearDataRangesFromFile(filename string) error
- func Serve(conf *BMNumberConfig)
- type BMNumber
- func (n *BMNumber) ExportBinary(withSize bool) (string, error)
- func (n *BMNumber) ExportBinaryNBits(bits int) (string, error)
- func (n *BMNumber) ExportString(c *BMNumberConfig) (string, error)
- func (n *BMNumber) ExportUint64() (uint64, error)
- func (n *BMNumber) ExportVerilogBinary() (string, error)
- func (n *BMNumber) GetBytes() []byte
- func (n *BMNumber) GetTypeName() string
- type BMNumberConfig
- type BMNumberServer
- type BMNumberType
- type BMNumbersRequest
- type BMNumbersResponse
- type Bin
- type DynFixedPoint
- type DynFloPoCo
- type DynLinearQuantizer
- type DynamicalType
- type FixedPoint
- type FloPoCo
- type Float16
- type Float32
- type Hex
- type ImportFunc
- type LinearDataRange
- type LinearQuantizer
- func (d LinearQuantizer) Convert(n *BMNumber) error
- func (d LinearQuantizer) ExportString(n *BMNumber) (string, error)
- func (d LinearQuantizer) GetName() string
- func (d LinearQuantizer) GetSize() int
- func (d LinearQuantizer) ShowInstructions() map[string]string
- func (d LinearQuantizer) ShowPrefix() string
- type Signed
- type Unsigned
Constants ¶
This section is empty.
Variables ¶
View Source
var AllDynamicalTypes []DynamicalType
View Source
var AllMatchers map[string]ImportFunc
View Source
var AllTypes []BMNumberType
Functions ¶
func CastType ¶
func CastType(n *BMNumber, t BMNumberType) error
func EventuallyCreateType ¶
Types ¶
type BMNumber ¶
type BMNumber struct {
// contains filtered or unexported fields
}
BMNumber is a binary representation of a number as a slice of bytes
func ImportString ¶
InitBMNumber creates a new BMNumber for a string
func ImportUint ¶
func (*BMNumber) ExportString ¶
func (n *BMNumber) ExportString(c *BMNumberConfig) (string, error)
func (*BMNumber) ExportUint64 ¶
func (*BMNumber) ExportVerilogBinary ¶
func (*BMNumber) GetTypeName ¶
type BMNumberConfig ¶
type BMNumberConfig struct {
OmitPrefix bool
}
type BMNumberServer ¶
type BMNumberServer struct {
// contains filtered or unexported fields
}
func (*BMNumberServer) ExecRequest ¶
func (s *BMNumberServer) ExecRequest(w http.ResponseWriter, r *http.Request)
func (*BMNumberServer) HomePage ¶
func (s *BMNumberServer) HomePage(w http.ResponseWriter, r *http.Request)
type BMNumberType ¶
type BMNumberType interface { GetName() string GetSize() int Convert(*BMNumber) error ExportString(*BMNumber) (string, error) ShowInstructions() map[string]string ShowPrefix() string // contains filtered or unexported methods }
func GetType ¶
func GetType(name string) BMNumberType
type BMNumbersRequest ¶
type BMNumbersResponse ¶
type BMNumbersResponse struct {
Numbers []string `json:"numbers"`
}
type DynFixedPoint ¶
type DynFixedPoint struct { }
func (DynFixedPoint) CreateType ¶
func (d DynFixedPoint) CreateType(name string, param interface{}) (BMNumberType, error)
func (DynFixedPoint) GetName ¶
func (d DynFixedPoint) GetName() string
func (DynFixedPoint) MatchName ¶
func (d DynFixedPoint) MatchName(name string) bool
type DynFloPoCo ¶
type DynFloPoCo struct{}
func (DynFloPoCo) CreateType ¶
func (d DynFloPoCo) CreateType(name string, param interface{}) (BMNumberType, error)
func (DynFloPoCo) GetName ¶
func (d DynFloPoCo) GetName() string
func (DynFloPoCo) MatchName ¶
func (d DynFloPoCo) MatchName(name string) bool
type DynLinearQuantizer ¶
type DynLinearQuantizer struct {
Ranges *map[int]LinearDataRange
}
func (DynLinearQuantizer) CreateType ¶
func (d DynLinearQuantizer) CreateType(name string, param interface{}) (BMNumberType, error)
func (DynLinearQuantizer) GetName ¶
func (d DynLinearQuantizer) GetName() string
func (DynLinearQuantizer) MatchName ¶
func (d DynLinearQuantizer) MatchName(name string) bool
type DynamicalType ¶
type FixedPoint ¶
type FixedPoint struct { FixedPointName string // contains filtered or unexported fields }
func (FixedPoint) Convert ¶
func (d FixedPoint) Convert(n *BMNumber) error
func (FixedPoint) ExportString ¶
func (d FixedPoint) ExportString(n *BMNumber) (string, error)
func (FixedPoint) GetName ¶
func (d FixedPoint) GetName() string
func (FixedPoint) GetSize ¶
func (d FixedPoint) GetSize() int
func (FixedPoint) ShowInstructions ¶
func (d FixedPoint) ShowInstructions() map[string]string
func (FixedPoint) ShowPrefix ¶
func (d FixedPoint) ShowPrefix() string
type FloPoCo ¶
type FloPoCo struct {
// contains filtered or unexported fields
}
func (FloPoCo) ShowInstructions ¶
func (FloPoCo) ShowPrefix ¶
type LinearDataRange ¶
type LinearDataRange struct {
Max float64
}
type LinearQuantizer ¶
type LinearQuantizer struct {
// contains filtered or unexported fields
}
func (LinearQuantizer) Convert ¶
func (d LinearQuantizer) Convert(n *BMNumber) error
func (LinearQuantizer) ExportString ¶
func (d LinearQuantizer) ExportString(n *BMNumber) (string, error)
func (LinearQuantizer) GetName ¶
func (d LinearQuantizer) GetName() string
func (LinearQuantizer) GetSize ¶
func (d LinearQuantizer) GetSize() int
func (LinearQuantizer) ShowInstructions ¶
func (d LinearQuantizer) ShowInstructions() map[string]string
func (LinearQuantizer) ShowPrefix ¶
func (d LinearQuantizer) ShowPrefix() string
type Unsigned ¶
type Unsigned struct{}
func (Unsigned) ShowInstructions ¶
func (Unsigned) ShowPrefix ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.