Documentation
¶
Overview ¶
Package encoding_go_gx are Go bindings to the GX package: github.com/gx-org/gx/tests/bindings/encoding.
Automatically generated by gx/golang/binder/gobindings/bindings.go.tmpl.
Index ¶
- type Arrays
- type Encoding
- type Factory
- type MethodScalarsGetTotal
- type Package
- func (cmpl *Package) AppendOptions(options ...options.PackageOptionFactory)
- func (cmpl *Package) MarshalArrays(val values.Value) (s *Arrays, err error)
- func (cmpl *Package) MarshalEncoding(val values.Value) (s *Encoding, err error)
- func (cmpl *Package) MarshalScalars(val values.Value) (s *Scalars, err error)
- func (cmpl *Package) MarshalSlice(val values.Value) (s *Slice, err error)
- type PackageIR
- type Scalars
- type Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arrays ¶
Arrays stores the handle of Arrays on a device.
type Encoding ¶
type Encoding struct {
Scalars *Scalars
DataAsSlices *Arrays
DataAsArrays *Arrays
// contains filtered or unexported fields
}
Encoding stores the handle of Encoding on a device.
type Factory ¶
type Factory struct {
Package *Package
}
Factory create new instance of types used in the package. The compiler associated with the factory defines on what device and with which options methods of the instances created by the factory are compiled for.
func (*Factory) NewEncoding ¶
NewEncoding returns a handle on named type Encoding.
func (*Factory) NewScalars ¶
NewScalars returns a handle on named type Scalars.
type MethodScalarsGetTotal ¶
type MethodScalarsGetTotal struct {
// contains filtered or unexported fields
}
MethodScalarsGetTotal compiles and runs the GX function GetTotal for a device. GetTotal returns the sum of all fields.
func (*MethodScalarsGetTotal) Run ¶
func (f *MethodScalarsGetTotal) Run() (_ types.Atom[float32], err error)
Run first compiles GetTotal for a given device and the given arguments. Once compiled, the function is then run with these same arguments. If the shape of the arguments change, the function will panic.
func (*MethodScalarsGetTotal) String ¶
func (f *MethodScalarsGetTotal) String() string
type Package ¶
type Package struct {
Package *PackageIR
Device *api.Device
Factory *Factory
// contains filtered or unexported fields
}
Package is a GX package for a given device. Functions and methods are compiled specifically for that device.
func BuildFor ¶
BuildFor loads the GX package github.com/gx-org/gx/tests/bindings/encoding then returns that package for a given device and options.
func (*Package) AppendOptions ¶
func (cmpl *Package) AppendOptions(options ...options.PackageOptionFactory)
AppendOptions appends options to the compiler.
func (*Package) MarshalArrays ¶
MarshalArrays populates the receiver fields with device handles.
func (*Package) MarshalEncoding ¶
MarshalEncoding populates the receiver fields with device handles.
func (*Package) MarshalScalars ¶
MarshalScalars populates the receiver fields with device handles.
type PackageIR ¶
PackageIR is the GX package intermediate representation built for a given runtime, but not yet for a specific device.
type Scalars ¶
type Scalars struct {
Int types.Atom[int32]
Float32 types.Atom[float32]
Float64 types.Atom[float64]
// contains filtered or unexported fields
}
Scalars stores the handle of Scalars on a device.
func (Scalars) GetTotal ¶
func (s Scalars) GetTotal() *MethodScalarsGetTotal
GetTotal returns a handle to compile method GetTotal for a device.