Documentation
¶
Overview ¶
Package mpsndarray provides a fluent Go API over the macOS MPSNDArray framework.
Types ¶
Each base type below lists the concrete types you construct and pass where the base is accepted:
- ArrayBinaryKernel: ArrayGather
- ArrayBinaryPrimaryGradientKernel: ArrayGatherGradient
- ArrayGradientState: ArrayGatherGradientState
- ArrayMatrixMultiplication: ArrayQuantizedMatrixMultiplication
- ArrayMultiaryBase: ArrayMultiaryGradientKernel, ArrayMultiaryKernel
- ArrayMultiaryGradientKernel: ArrayBinaryPrimaryGradientKernel, ArrayBinarySecondaryGradientKernel, ArrayUnaryGradientKernel
- ArrayMultiaryKernel: ArrayAffineInt4Dequantize, ArrayBinaryKernel, ArrayLUTDequantize, ArrayMatrixMultiplication, ArrayUnaryKernel, ArrayVectorLUTDequantize
- ArrayQuantizationDescriptor: ArrayAffineQuantizationDescriptor, ArrayLUTQuantizationDescriptor
- ArrayUnaryGradientKernel: ArrayStridedSliceGradient
- ArrayUnaryKernel: ArrayIdentity, ArrayStridedSlice
Index ¶
- type ArrayAffineInt4Dequantize
- type ArrayAffineInt4Dequantizeable
- type ArrayAffineQuantizationDescriptor
- func (x *ArrayAffineQuantizationDescriptor) HasMinValue() bool
- func (x *ArrayAffineQuantizationDescriptor) HasZeroPoint() bool
- func (x *ArrayAffineQuantizationDescriptor) ImplicitZeroPoint() bool
- func (x *ArrayAffineQuantizationDescriptor) SetHasMinValue(hasMinValue bool)
- func (x *ArrayAffineQuantizationDescriptor) SetHasZeroPoint(hasZeroPoint bool)
- func (x *ArrayAffineQuantizationDescriptor) SetImplicitZeroPoint(implicitZeroPoint bool)
- func (x *ArrayAffineQuantizationDescriptor) WithHasMinValue(hasMinValue bool) *ArrayAffineQuantizationDescriptor
- func (x *ArrayAffineQuantizationDescriptor) WithHasZeroPoint(hasZeroPoint bool) *ArrayAffineQuantizationDescriptor
- func (x *ArrayAffineQuantizationDescriptor) WithImplicitZeroPoint(implicitZeroPoint bool) *ArrayAffineQuantizationDescriptor
- type ArrayAffineQuantizationDescriptorable
- type ArrayBinaryKernel
- type ArrayBinaryKernelProvider
- type ArrayBinaryKernelable
- type ArrayBinaryPrimaryGradientKernel
- type ArrayBinaryPrimaryGradientKernelProvider
- type ArrayBinaryPrimaryGradientKernelable
- type ArrayBinarySecondaryGradientKernel
- type ArrayBinarySecondaryGradientKernelable
- type ArrayGather
- type ArrayGatherGradient
- type ArrayGatherGradientState
- type ArrayGatherGradientStateable
- type ArrayGatherGradientable
- type ArrayGatherable
- type ArrayGradientState
- type ArrayGradientStateProvider
- type ArrayGradientStateable
- type ArrayIdentity
- type ArrayIdentityable
- type ArrayLUTDequantize
- type ArrayLUTDequantizeable
- type ArrayLUTQuantizationDescriptor
- type ArrayLUTQuantizationDescriptorable
- type ArrayMatrixMultiplication
- func (x *ArrayMatrixMultiplication) Alpha() float64
- func (x *ArrayMatrixMultiplication) Beta() float64
- func (x *ArrayMatrixMultiplication) SetAlpha(alpha float64)
- func (x *ArrayMatrixMultiplication) SetBeta(beta float64)
- func (x *ArrayMatrixMultiplication) WithAlpha(alpha float64) *ArrayMatrixMultiplication
- func (x *ArrayMatrixMultiplication) WithBeta(beta float64) *ArrayMatrixMultiplication
- type ArrayMatrixMultiplicationProvider
- type ArrayMatrixMultiplicationable
- type ArrayMultiaryBase
- func (x *ArrayMultiaryBase) Description() string
- func (x *ArrayMultiaryBase) DestinationArrayDescriptorForSourceArraysSourceState(sources []obj.Object, state obj.Object) obj.Object
- func (x *ArrayMultiaryBase) EncodeWithCoder(coder obj.Object)
- func (x *ArrayMultiaryBase) IsEqual(other obj.Object) bool
- func (x *ArrayMultiaryBase) IsKind(className string) bool
- func (x *ArrayMultiaryBase) ResultStateForSourceArraysSourceStatesDestinationArray(sourceArrays []obj.Object, sourceStates []obj.Object, ...) obj.Object
- func (x *ArrayMultiaryBase) String() string
- type ArrayMultiaryBaseProvider
- type ArrayMultiaryBaseable
- type ArrayMultiaryGradientKernel
- type ArrayMultiaryGradientKernelProvider
- type ArrayMultiaryGradientKernelable
- type ArrayMultiaryKernel
- type ArrayMultiaryKernelProvider
- type ArrayMultiaryKernelable
- type ArrayQuantizationDescriptor
- func (x *ArrayQuantizationDescriptor) Description() string
- func (x *ArrayQuantizationDescriptor) IsEqual(other obj.Object) bool
- func (x *ArrayQuantizationDescriptor) IsKind(className string) bool
- func (x *ArrayQuantizationDescriptor) QuantizationScheme() ArrayQuantizationScheme
- func (x *ArrayQuantizationDescriptor) String() string
- type ArrayQuantizationDescriptorProvider
- type ArrayQuantizationDescriptorable
- type ArrayQuantizationScheme
- type ArrayQuantizedMatrixMultiplication
- type ArrayQuantizedMatrixMultiplicationable
- type ArrayStridedSlice
- type ArrayStridedSliceGradient
- type ArrayStridedSliceGradientable
- type ArrayStridedSliceable
- type ArrayUnaryGradientKernel
- type ArrayUnaryGradientKernelProvider
- type ArrayUnaryGradientKernelable
- type ArrayUnaryKernel
- type ArrayUnaryKernelProvider
- type ArrayUnaryKernelable
- type ArrayVectorLUTDequantize
- type ArrayVectorLUTDequantizeable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayAffineInt4Dequantize ¶
type ArrayAffineInt4Dequantize struct {
ArrayMultiaryKernel
}
ArrayAffineInt4Dequantize is an idiomatic wrapper over the Objective-C class MPSNDArrayAffineInt4Dequantize.
It embeds ArrayMultiaryKernel, promoting that type's methods.
func ArrayAffineInt4DequantizeFromID ¶
func ArrayAffineInt4DequantizeFromID(id objc.ID) *ArrayAffineInt4Dequantize
ArrayAffineInt4DequantizeFromID adopts an existing Objective-C object as a ArrayAffineInt4Dequantize (nil for 0), retaining it and registering a release finalizer.
func NewArrayAffineInt4Dequantize ¶ added in v0.10.0
func NewArrayAffineInt4Dequantize() *ArrayAffineInt4Dequantize
NewArrayAffineInt4Dequantize creates a new ArrayAffineInt4Dequantize.
type ArrayAffineInt4Dequantizeable ¶
ArrayAffineInt4Dequantizeable is the interface implemented by ArrayAffineInt4Dequantize, for mocking and DI.
type ArrayAffineQuantizationDescriptor ¶
type ArrayAffineQuantizationDescriptor struct {
ArrayQuantizationDescriptor
}
ArrayAffineQuantizationDescriptor is an idiomatic wrapper over the Objective-C class MPSNDArrayAffineQuantizationDescriptor.
It embeds ArrayQuantizationDescriptor, promoting that type's methods.
func ArrayAffineQuantizationDescriptorFromID ¶
func ArrayAffineQuantizationDescriptorFromID(id objc.ID) *ArrayAffineQuantizationDescriptor
ArrayAffineQuantizationDescriptorFromID adopts an existing Objective-C object as a ArrayAffineQuantizationDescriptor (nil for 0), retaining it and registering a release finalizer.
func NewArrayAffineQuantizationDescriptor ¶
func NewArrayAffineQuantizationDescriptor() *ArrayAffineQuantizationDescriptor
NewArrayAffineQuantizationDescriptor creates a new ArrayAffineQuantizationDescriptor.
func (*ArrayAffineQuantizationDescriptor) HasMinValue ¶
func (x *ArrayAffineQuantizationDescriptor) HasMinValue() bool
HasMinValue if yes then offset is used. See MPSNDArrayQuantizationScheme.
func (*ArrayAffineQuantizationDescriptor) HasZeroPoint ¶
func (x *ArrayAffineQuantizationDescriptor) HasZeroPoint() bool
HasZeroPoint if yes then asymmetric quantization is used. See MPSNDArrayQuantizationScheme.
func (*ArrayAffineQuantizationDescriptor) ImplicitZeroPoint ¶
func (x *ArrayAffineQuantizationDescriptor) ImplicitZeroPoint() bool
ImplicitZeroPoint if true and quantized values are signed, these are assumed to be stored with an implicit offset or zero-point of 2^(quantizationBitWidth-1) added to bring signed values into unsigned range. e.g. Int4 values are in range [-8,7]. If we add 8 to it values are in range [0,15] and can be encoded/stored as UInt4. Default is false. Its only currently applicable to Int4. Implementation will generate error for any other data type;
func (*ArrayAffineQuantizationDescriptor) SetHasMinValue ¶
func (x *ArrayAffineQuantizationDescriptor) SetHasMinValue(hasMinValue bool)
SetHasMinValue wraps the corresponding Objective-C method.
func (*ArrayAffineQuantizationDescriptor) SetHasZeroPoint ¶
func (x *ArrayAffineQuantizationDescriptor) SetHasZeroPoint(hasZeroPoint bool)
SetHasZeroPoint wraps the corresponding Objective-C method.
func (*ArrayAffineQuantizationDescriptor) SetImplicitZeroPoint ¶
func (x *ArrayAffineQuantizationDescriptor) SetImplicitZeroPoint(implicitZeroPoint bool)
SetImplicitZeroPoint wraps the corresponding Objective-C method.
func (*ArrayAffineQuantizationDescriptor) WithHasMinValue ¶
func (x *ArrayAffineQuantizationDescriptor) WithHasMinValue(hasMinValue bool) *ArrayAffineQuantizationDescriptor
WithHasMinValue if yes then offset is used. See MPSNDArrayQuantizationScheme.
func (*ArrayAffineQuantizationDescriptor) WithHasZeroPoint ¶
func (x *ArrayAffineQuantizationDescriptor) WithHasZeroPoint(hasZeroPoint bool) *ArrayAffineQuantizationDescriptor
WithHasZeroPoint if yes then asymmetric quantization is used. See MPSNDArrayQuantizationScheme.
func (*ArrayAffineQuantizationDescriptor) WithImplicitZeroPoint ¶
func (x *ArrayAffineQuantizationDescriptor) WithImplicitZeroPoint(implicitZeroPoint bool) *ArrayAffineQuantizationDescriptor
WithImplicitZeroPoint if true and quantized values are signed, these are assumed to be stored with an implicit offset or zero-point of 2^(quantizationBitWidth-1) added to bring signed values into unsigned range. e.g. Int4 values are in range [-8,7]. If we add 8 to it values are in range [0,15] and can be encoded/stored as UInt4. Default is false. Its only currently applicable to Int4. Implementation will generate error for any other data type;
type ArrayAffineQuantizationDescriptorable ¶
type ArrayAffineQuantizationDescriptorable interface {
obj.Object
WithHasZeroPoint(hasZeroPoint bool) *ArrayAffineQuantizationDescriptor
WithHasMinValue(hasMinValue bool) *ArrayAffineQuantizationDescriptor
WithImplicitZeroPoint(implicitZeroPoint bool) *ArrayAffineQuantizationDescriptor
HasZeroPoint() bool
SetHasZeroPoint(hasZeroPoint bool)
HasMinValue() bool
SetHasMinValue(hasMinValue bool)
ImplicitZeroPoint() bool
SetImplicitZeroPoint(implicitZeroPoint bool)
}
ArrayAffineQuantizationDescriptorable is the interface implemented by ArrayAffineQuantizationDescriptor, for mocking and DI.
type ArrayBinaryKernel ¶
type ArrayBinaryKernel struct {
ArrayMultiaryKernel
}
ArrayBinaryKernel is an idiomatic wrapper over the Objective-C class MPSNDArrayBinaryKernel.
ArrayBinaryKernel is an abstract base — you do not construct it directly. Construct one of ArrayGather and pass it where a ArrayBinaryKernel is accepted.
func ArrayBinaryKernelFromID ¶
func ArrayBinaryKernelFromID(id objc.ID) *ArrayBinaryKernel
ArrayBinaryKernelFromID adopts an existing Objective-C object as a ArrayBinaryKernel (nil for 0), retaining it and registering a release finalizer.
type ArrayBinaryKernelProvider ¶
type ArrayBinaryKernelProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayBinaryKernelProvider is accepted wherever a MPSNDArrayBinaryKernel (or one of its subclasses) is expected.
type ArrayBinaryKernelable ¶
ArrayBinaryKernelable is the interface implemented by ArrayBinaryKernel, for mocking and DI.
type ArrayBinaryPrimaryGradientKernel ¶
type ArrayBinaryPrimaryGradientKernel struct {
ArrayMultiaryGradientKernel
}
ArrayBinaryPrimaryGradientKernel is an idiomatic wrapper over the Objective-C class MPSNDArrayBinaryPrimaryGradientKernel.
ArrayBinaryPrimaryGradientKernel is an abstract base — you do not construct it directly. Construct one of ArrayGatherGradient and pass it where a ArrayBinaryPrimaryGradientKernel is accepted.
func ArrayBinaryPrimaryGradientKernelFromID ¶
func ArrayBinaryPrimaryGradientKernelFromID(id objc.ID) *ArrayBinaryPrimaryGradientKernel
ArrayBinaryPrimaryGradientKernelFromID adopts an existing Objective-C object as a ArrayBinaryPrimaryGradientKernel (nil for 0), retaining it and registering a release finalizer.
type ArrayBinaryPrimaryGradientKernelProvider ¶
type ArrayBinaryPrimaryGradientKernelProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayBinaryPrimaryGradientKernelProvider is accepted wherever a MPSNDArrayBinaryPrimaryGradientKernel (or one of its subclasses) is expected.
type ArrayBinaryPrimaryGradientKernelable ¶
ArrayBinaryPrimaryGradientKernelable is the interface implemented by ArrayBinaryPrimaryGradientKernel, for mocking and DI.
type ArrayBinarySecondaryGradientKernel ¶
type ArrayBinarySecondaryGradientKernel struct {
ArrayMultiaryGradientKernel
}
ArrayBinarySecondaryGradientKernel is an idiomatic wrapper over the Objective-C class MPSNDArrayBinarySecondaryGradientKernel.
It embeds ArrayMultiaryGradientKernel, promoting that type's methods.
func ArrayBinarySecondaryGradientKernelFromID ¶
func ArrayBinarySecondaryGradientKernelFromID(id objc.ID) *ArrayBinarySecondaryGradientKernel
ArrayBinarySecondaryGradientKernelFromID adopts an existing Objective-C object as a ArrayBinarySecondaryGradientKernel (nil for 0), retaining it and registering a release finalizer.
func NewArrayBinarySecondaryGradientKernel ¶ added in v0.10.0
func NewArrayBinarySecondaryGradientKernel() *ArrayBinarySecondaryGradientKernel
NewArrayBinarySecondaryGradientKernel creates a new ArrayBinarySecondaryGradientKernel.
type ArrayBinarySecondaryGradientKernelable ¶
ArrayBinarySecondaryGradientKernelable is the interface implemented by ArrayBinarySecondaryGradientKernel, for mocking and DI.
type ArrayGather ¶
type ArrayGather struct {
ArrayBinaryKernel
}
ArrayGather is an idiomatic wrapper over the Objective-C class MPSNDArrayGather.
It embeds ArrayBinaryKernel, promoting that type's methods.
func ArrayGatherFromID ¶
func ArrayGatherFromID(id objc.ID) *ArrayGather
ArrayGatherFromID adopts an existing Objective-C object as a ArrayGather (nil for 0), retaining it and registering a release finalizer.
func (*ArrayGather) Axis ¶
func (x *ArrayGather) Axis() int
Axis the axis along which to apply the gather operation. Defaults to zero.
func (*ArrayGather) SetAxis ¶
func (x *ArrayGather) SetAxis(axis int)
SetAxis wraps the corresponding Objective-C method.
func (*ArrayGather) WithAxis ¶
func (x *ArrayGather) WithAxis(axis int) *ArrayGather
WithAxis the axis along which to apply the gather operation. Defaults to zero.
type ArrayGatherGradient ¶
type ArrayGatherGradient struct {
ArrayBinaryPrimaryGradientKernel
}
ArrayGatherGradient is an idiomatic wrapper over the Objective-C class MPSNDArrayGatherGradient.
It embeds ArrayBinaryPrimaryGradientKernel, promoting that type's methods.
func ArrayGatherGradientFromID ¶
func ArrayGatherGradientFromID(id objc.ID) *ArrayGatherGradient
ArrayGatherGradientFromID adopts an existing Objective-C object as a ArrayGatherGradient (nil for 0), retaining it and registering a release finalizer.
func NewArrayGatherGradient ¶
func NewArrayGatherGradient() *ArrayGatherGradient
NewArrayGatherGradient creates a new ArrayGatherGradient.
type ArrayGatherGradientState ¶
type ArrayGatherGradientState struct {
ArrayGradientState
}
ArrayGatherGradientState is an idiomatic wrapper over the Objective-C class MPSNDArrayGatherGradientState.
It embeds ArrayGradientState, promoting that type's methods.
func ArrayGatherGradientStateFromID ¶
func ArrayGatherGradientStateFromID(id objc.ID) *ArrayGatherGradientState
ArrayGatherGradientStateFromID adopts an existing Objective-C object as a ArrayGatherGradientState (nil for 0), retaining it and registering a release finalizer.
func NewArrayGatherGradientState ¶
func NewArrayGatherGradientState() *ArrayGatherGradientState
NewArrayGatherGradientState creates a new ArrayGatherGradientState.
type ArrayGatherGradientStateable ¶
ArrayGatherGradientStateable is the interface implemented by ArrayGatherGradientState, for mocking and DI.
type ArrayGatherGradientable ¶
ArrayGatherGradientable is the interface implemented by ArrayGatherGradient, for mocking and DI.
type ArrayGatherable ¶
type ArrayGatherable interface {
obj.Object
WithAxis(axis int) *ArrayGather
Axis() int
SetAxis(axis int)
}
ArrayGatherable is the interface implemented by ArrayGather, for mocking and DI.
type ArrayGradientState ¶
ArrayGradientState is an idiomatic wrapper over the Objective-C class MPSNDArrayGradientState.
ArrayGradientState is an abstract base — you do not construct it directly. Construct one of ArrayGatherGradientState and pass it where a ArrayGradientState is accepted.
func ArrayGradientStateFromID ¶
func ArrayGradientStateFromID(id objc.ID) *ArrayGradientState
ArrayGradientStateFromID adopts an existing Objective-C object as a ArrayGradientState (nil for 0), retaining it and registering a release finalizer.
func (*ArrayGradientState) Description ¶ added in v0.10.0
func (x *ArrayGradientState) Description() string
Description returns the object's -description text.
func (*ArrayGradientState) IsEqual ¶ added in v0.10.0
func (x *ArrayGradientState) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ArrayGradientState) IsKind ¶ added in v0.10.0
func (x *ArrayGradientState) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ArrayGradientState) String ¶ added in v0.10.0
func (x *ArrayGradientState) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type ArrayGradientStateProvider ¶
type ArrayGradientStateProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayGradientStateProvider is accepted wherever a MPSNDArrayGradientState (or one of its subclasses) is expected.
type ArrayGradientStateable ¶
ArrayGradientStateable is the interface implemented by ArrayGradientState, for mocking and DI.
type ArrayIdentity ¶
type ArrayIdentity struct {
ArrayUnaryKernel
}
ArrayIdentity is an idiomatic wrapper over the Objective-C class MPSNDArrayIdentity.
It embeds ArrayUnaryKernel, promoting that type's methods.
func ArrayIdentityFromID ¶
func ArrayIdentityFromID(id objc.ID) *ArrayIdentity
ArrayIdentityFromID adopts an existing Objective-C object as a ArrayIdentity (nil for 0), retaining it and registering a release finalizer.
func NewArrayIdentity ¶ added in v0.10.0
func NewArrayIdentity() *ArrayIdentity
NewArrayIdentity creates a new ArrayIdentity.
type ArrayIdentityable ¶
ArrayIdentityable is the interface implemented by ArrayIdentity, for mocking and DI.
type ArrayLUTDequantize ¶
type ArrayLUTDequantize struct {
ArrayMultiaryKernel
}
ArrayLUTDequantize is an idiomatic wrapper over the Objective-C class MPSNDArrayLUTDequantize.
It embeds ArrayMultiaryKernel, promoting that type's methods.
func ArrayLUTDequantizeFromID ¶
func ArrayLUTDequantizeFromID(id objc.ID) *ArrayLUTDequantize
ArrayLUTDequantizeFromID adopts an existing Objective-C object as a ArrayLUTDequantize (nil for 0), retaining it and registering a release finalizer.
func NewArrayLUTDequantize ¶ added in v0.10.0
func NewArrayLUTDequantize() *ArrayLUTDequantize
NewArrayLUTDequantize creates a new ArrayLUTDequantize.
type ArrayLUTDequantizeable ¶
ArrayLUTDequantizeable is the interface implemented by ArrayLUTDequantize, for mocking and DI.
type ArrayLUTQuantizationDescriptor ¶
type ArrayLUTQuantizationDescriptor struct {
ArrayQuantizationDescriptor
}
ArrayLUTQuantizationDescriptor is an idiomatic wrapper over the Objective-C class MPSNDArrayLUTQuantizationDescriptor.
It embeds ArrayQuantizationDescriptor, promoting that type's methods.
func ArrayLUTQuantizationDescriptorFromID ¶
func ArrayLUTQuantizationDescriptorFromID(id objc.ID) *ArrayLUTQuantizationDescriptor
ArrayLUTQuantizationDescriptorFromID adopts an existing Objective-C object as a ArrayLUTQuantizationDescriptor (nil for 0), retaining it and registering a release finalizer.
func NewArrayLUTQuantizationDescriptor ¶ added in v0.10.0
func NewArrayLUTQuantizationDescriptor() *ArrayLUTQuantizationDescriptor
NewArrayLUTQuantizationDescriptor creates a new ArrayLUTQuantizationDescriptor.
type ArrayLUTQuantizationDescriptorable ¶
ArrayLUTQuantizationDescriptorable is the interface implemented by ArrayLUTQuantizationDescriptor, for mocking and DI.
type ArrayMatrixMultiplication ¶
type ArrayMatrixMultiplication struct {
ArrayMultiaryKernel
}
ArrayMatrixMultiplication is an idiomatic wrapper over the Objective-C class MPSNDArrayMatrixMultiplication.
ArrayMatrixMultiplication is an abstract base — you do not construct it directly. Construct one of ArrayQuantizedMatrixMultiplication and pass it where a ArrayMatrixMultiplication is accepted.
func ArrayMatrixMultiplicationFromID ¶
func ArrayMatrixMultiplicationFromID(id objc.ID) *ArrayMatrixMultiplication
ArrayMatrixMultiplicationFromID adopts an existing Objective-C object as a ArrayMatrixMultiplication (nil for 0), retaining it and registering a release finalizer.
func (*ArrayMatrixMultiplication) Alpha ¶
func (x *ArrayMatrixMultiplication) Alpha() float64
Alpha the scale factor to apply to the product. Specified in double precision. Will be converted to the appropriate precision in the implementation subject to rounding and/or clamping as necessary. Defaults to 1.0 at initialization time.
func (*ArrayMatrixMultiplication) Beta ¶
func (x *ArrayMatrixMultiplication) Beta() float64
Beta the scale factor to apply to the addend if available. Specified in double precision. Will be converted to the appropriate precision in the implementation subject to rounding and/or clamping as necessary. Defaults to 1.0 at initialization time.
func (*ArrayMatrixMultiplication) SetAlpha ¶
func (x *ArrayMatrixMultiplication) SetAlpha(alpha float64)
SetAlpha wraps the corresponding Objective-C method.
func (*ArrayMatrixMultiplication) SetBeta ¶
func (x *ArrayMatrixMultiplication) SetBeta(beta float64)
SetBeta wraps the corresponding Objective-C method.
func (*ArrayMatrixMultiplication) WithAlpha ¶
func (x *ArrayMatrixMultiplication) WithAlpha(alpha float64) *ArrayMatrixMultiplication
WithAlpha the scale factor to apply to the product. Specified in double precision. Will be converted to the appropriate precision in the implementation subject to rounding and/or clamping as necessary. Defaults to 1.0 at initialization time.
func (*ArrayMatrixMultiplication) WithBeta ¶
func (x *ArrayMatrixMultiplication) WithBeta(beta float64) *ArrayMatrixMultiplication
WithBeta the scale factor to apply to the addend if available. Specified in double precision. Will be converted to the appropriate precision in the implementation subject to rounding and/or clamping as necessary. Defaults to 1.0 at initialization time.
type ArrayMatrixMultiplicationProvider ¶
type ArrayMatrixMultiplicationProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayMatrixMultiplicationProvider is accepted wherever a MPSNDArrayMatrixMultiplication (or one of its subclasses) is expected.
type ArrayMatrixMultiplicationable ¶
type ArrayMatrixMultiplicationable interface {
obj.Object
WithAlpha(alpha float64) *ArrayMatrixMultiplication
WithBeta(beta float64) *ArrayMatrixMultiplication
Alpha() float64
SetAlpha(alpha float64)
Beta() float64
SetBeta(beta float64)
}
ArrayMatrixMultiplicationable is the interface implemented by ArrayMatrixMultiplication, for mocking and DI.
type ArrayMultiaryBase ¶
ArrayMultiaryBase is an idiomatic wrapper over the Objective-C class MPSNDArrayMultiaryBase.
ArrayMultiaryBase is an abstract base — you do not construct it directly. Construct one of ArrayMultiaryGradientKernel, ArrayMultiaryKernel and pass it where a ArrayMultiaryBase is accepted.
func ArrayMultiaryBaseFromID ¶
func ArrayMultiaryBaseFromID(id objc.ID) *ArrayMultiaryBase
ArrayMultiaryBaseFromID adopts an existing Objective-C object as a ArrayMultiaryBase (nil for 0), retaining it and registering a release finalizer.
func (*ArrayMultiaryBase) Description ¶ added in v0.10.0
func (x *ArrayMultiaryBase) Description() string
Description returns the object's -description text.
func (*ArrayMultiaryBase) DestinationArrayDescriptorForSourceArraysSourceState ¶
func (x *ArrayMultiaryBase) DestinationArrayDescriptorForSourceArraysSourceState(sources []obj.Object, state obj.Object) obj.Object
DestinationArrayDescriptorForSourceArraysSourceState return a descriptor suitable for allocating a NSArray to receive the result The object properties (kernelSize, offsets, edgeMode, etc.) should be properly configured as if the -encode call was about to be made, before this method is called. Those properties may affect the results.
func (*ArrayMultiaryBase) EncodeWithCoder ¶
func (x *ArrayMultiaryBase) EncodeWithCoder(coder obj.Object)
EncodeWithCoder initialize a MPSNDArrayMultiaryKernel from a NSCoder
func (*ArrayMultiaryBase) IsEqual ¶ added in v0.10.0
func (x *ArrayMultiaryBase) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ArrayMultiaryBase) IsKind ¶ added in v0.10.0
func (x *ArrayMultiaryBase) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ArrayMultiaryBase) ResultStateForSourceArraysSourceStatesDestinationArray ¶
func (x *ArrayMultiaryBase) ResultStateForSourceArraysSourceStatesDestinationArray(sourceArrays []obj.Object, sourceStates []obj.Object, destinationArray obj.Object) obj.Object
ResultStateForSourceArraysSourceStatesDestinationArray wraps the corresponding Objective-C method.
func (*ArrayMultiaryBase) String ¶ added in v0.10.0
func (x *ArrayMultiaryBase) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type ArrayMultiaryBaseProvider ¶
type ArrayMultiaryBaseProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayMultiaryBaseProvider is accepted wherever a MPSNDArrayMultiaryBase (or one of its subclasses) is expected.
type ArrayMultiaryBaseable ¶
type ArrayMultiaryBaseable interface {
obj.Object
EncodeWithCoder(coder obj.Object)
ResultStateForSourceArraysSourceStatesDestinationArray(sourceArrays []obj.Object, sourceStates []obj.Object, destinationArray obj.Object) obj.Object
DestinationArrayDescriptorForSourceArraysSourceState(sources []obj.Object, state obj.Object) obj.Object
}
ArrayMultiaryBaseable is the interface implemented by ArrayMultiaryBase, for mocking and DI.
type ArrayMultiaryGradientKernel ¶
type ArrayMultiaryGradientKernel struct {
ArrayMultiaryBase
}
ArrayMultiaryGradientKernel is an idiomatic wrapper over the Objective-C class MPSNDArrayMultiaryGradientKernel.
ArrayMultiaryGradientKernel is an abstract base — you do not construct it directly. Construct one of ArrayBinaryPrimaryGradientKernel, ArrayBinarySecondaryGradientKernel, ArrayUnaryGradientKernel and pass it where a ArrayMultiaryGradientKernel is accepted.
func ArrayMultiaryGradientKernelFromID ¶
func ArrayMultiaryGradientKernelFromID(id objc.ID) *ArrayMultiaryGradientKernel
ArrayMultiaryGradientKernelFromID adopts an existing Objective-C object as a ArrayMultiaryGradientKernel (nil for 0), retaining it and registering a release finalizer.
type ArrayMultiaryGradientKernelProvider ¶
type ArrayMultiaryGradientKernelProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayMultiaryGradientKernelProvider is accepted wherever a MPSNDArrayMultiaryGradientKernel (or one of its subclasses) is expected.
type ArrayMultiaryGradientKernelable ¶
ArrayMultiaryGradientKernelable is the interface implemented by ArrayMultiaryGradientKernel, for mocking and DI.
type ArrayMultiaryKernel ¶
type ArrayMultiaryKernel struct {
ArrayMultiaryBase
}
ArrayMultiaryKernel is an idiomatic wrapper over the Objective-C class MPSNDArrayMultiaryKernel.
ArrayMultiaryKernel is an abstract base — you do not construct it directly. Construct one of ArrayAffineInt4Dequantize, ArrayBinaryKernel, ArrayLUTDequantize, ArrayMatrixMultiplication, ArrayUnaryKernel, ArrayVectorLUTDequantize and pass it where a ArrayMultiaryKernel is accepted.
func ArrayMultiaryKernelFromID ¶
func ArrayMultiaryKernelFromID(id objc.ID) *ArrayMultiaryKernel
ArrayMultiaryKernelFromID adopts an existing Objective-C object as a ArrayMultiaryKernel (nil for 0), retaining it and registering a release finalizer.
type ArrayMultiaryKernelProvider ¶
type ArrayMultiaryKernelProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayMultiaryKernelProvider is accepted wherever a MPSNDArrayMultiaryKernel (or one of its subclasses) is expected.
type ArrayMultiaryKernelable ¶
ArrayMultiaryKernelable is the interface implemented by ArrayMultiaryKernel, for mocking and DI.
type ArrayQuantizationDescriptor ¶
ArrayQuantizationDescriptor is an idiomatic wrapper over the Objective-C class MPSNDArrayQuantizationDescriptor.
ArrayQuantizationDescriptor is an abstract base — you do not construct it directly. Construct one of ArrayAffineQuantizationDescriptor, ArrayLUTQuantizationDescriptor and pass it where a ArrayQuantizationDescriptor is accepted.
func ArrayQuantizationDescriptorFromID ¶
func ArrayQuantizationDescriptorFromID(id objc.ID) *ArrayQuantizationDescriptor
ArrayQuantizationDescriptorFromID adopts an existing Objective-C object as a ArrayQuantizationDescriptor (nil for 0), retaining it and registering a release finalizer.
func (*ArrayQuantizationDescriptor) Description ¶ added in v0.10.0
func (x *ArrayQuantizationDescriptor) Description() string
Description returns the object's -description text.
func (*ArrayQuantizationDescriptor) IsEqual ¶ added in v0.10.0
func (x *ArrayQuantizationDescriptor) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ArrayQuantizationDescriptor) IsKind ¶ added in v0.10.0
func (x *ArrayQuantizationDescriptor) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ArrayQuantizationDescriptor) QuantizationScheme ¶
func (x *ArrayQuantizationDescriptor) QuantizationScheme() ArrayQuantizationScheme
QuantizationScheme the quantization scheme for this descriptor. The default is MPSNDArrayQuantizationTypeNone.
func (*ArrayQuantizationDescriptor) String ¶ added in v0.10.0
func (x *ArrayQuantizationDescriptor) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type ArrayQuantizationDescriptorProvider ¶
type ArrayQuantizationDescriptorProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayQuantizationDescriptorProvider is accepted wherever a MPSNDArrayQuantizationDescriptor (or one of its subclasses) is expected.
type ArrayQuantizationDescriptorable ¶
type ArrayQuantizationDescriptorable interface {
obj.Object
QuantizationScheme() ArrayQuantizationScheme
}
ArrayQuantizationDescriptorable is the interface implemented by ArrayQuantizationDescriptor, for mocking and DI.
type ArrayQuantizationScheme ¶ added in v0.10.0
type ArrayQuantizationScheme uint64
Bitmask — values may be combined with |.
const ( ArrayQuantizationTypeNone ArrayQuantizationScheme = 0 ArrayQuantizationTypeAffine ArrayQuantizationScheme = 1 ArrayQuantizationTypeLUT ArrayQuantizationScheme = 2 )
func (ArrayQuantizationScheme) String ¶ added in v0.10.0
func (e ArrayQuantizationScheme) String() string
String returns the ArrayQuantizationScheme constant's name, or its numeric form when the value is not a known constant.
type ArrayQuantizedMatrixMultiplication ¶
type ArrayQuantizedMatrixMultiplication struct {
ArrayMatrixMultiplication
}
ArrayQuantizedMatrixMultiplication is an idiomatic wrapper over the Objective-C class MPSNDArrayQuantizedMatrixMultiplication.
It embeds ArrayMatrixMultiplication, promoting that type's methods.
func ArrayQuantizedMatrixMultiplicationFromID ¶
func ArrayQuantizedMatrixMultiplicationFromID(id objc.ID) *ArrayQuantizedMatrixMultiplication
ArrayQuantizedMatrixMultiplicationFromID adopts an existing Objective-C object as a ArrayQuantizedMatrixMultiplication (nil for 0), retaining it and registering a release finalizer.
func NewArrayQuantizedMatrixMultiplication ¶ added in v0.10.0
func NewArrayQuantizedMatrixMultiplication() *ArrayQuantizedMatrixMultiplication
NewArrayQuantizedMatrixMultiplication creates a new ArrayQuantizedMatrixMultiplication.
func (*ArrayQuantizedMatrixMultiplication) WithAlpha ¶ added in v0.3.1
func (x *ArrayQuantizedMatrixMultiplication) WithAlpha(alpha float64) *ArrayQuantizedMatrixMultiplication
WithAlpha the scale factor to apply to the product. Specified in double precision. Will be converted to the appropriate precision in the implementation subject to rounding and/or clamping as necessary. Defaults to 1.0 at initialization time.
func (*ArrayQuantizedMatrixMultiplication) WithBeta ¶ added in v0.3.1
func (x *ArrayQuantizedMatrixMultiplication) WithBeta(beta float64) *ArrayQuantizedMatrixMultiplication
WithBeta the scale factor to apply to the addend if available. Specified in double precision. Will be converted to the appropriate precision in the implementation subject to rounding and/or clamping as necessary. Defaults to 1.0 at initialization time.
type ArrayQuantizedMatrixMultiplicationable ¶
type ArrayQuantizedMatrixMultiplicationable interface {
obj.Object
WithAlpha(alpha float64) *ArrayQuantizedMatrixMultiplication
WithBeta(beta float64) *ArrayQuantizedMatrixMultiplication
}
ArrayQuantizedMatrixMultiplicationable is the interface implemented by ArrayQuantizedMatrixMultiplication, for mocking and DI.
type ArrayStridedSlice ¶
type ArrayStridedSlice struct {
ArrayUnaryKernel
}
ArrayStridedSlice is an idiomatic wrapper over the Objective-C class MPSNDArrayStridedSlice.
It embeds ArrayUnaryKernel, promoting that type's methods.
func ArrayStridedSliceFromID ¶
func ArrayStridedSliceFromID(id objc.ID) *ArrayStridedSlice
ArrayStridedSliceFromID adopts an existing Objective-C object as a ArrayStridedSlice (nil for 0), retaining it and registering a release finalizer.
func NewArrayStridedSlice ¶
func NewArrayStridedSlice() *ArrayStridedSlice
NewArrayStridedSlice creates a new ArrayStridedSlice.
type ArrayStridedSliceGradient ¶
type ArrayStridedSliceGradient struct {
ArrayUnaryGradientKernel
}
ArrayStridedSliceGradient is an idiomatic wrapper over the Objective-C class MPSNDArrayStridedSliceGradient.
It embeds ArrayUnaryGradientKernel, promoting that type's methods.
func ArrayStridedSliceGradientFromID ¶
func ArrayStridedSliceGradientFromID(id objc.ID) *ArrayStridedSliceGradient
ArrayStridedSliceGradientFromID adopts an existing Objective-C object as a ArrayStridedSliceGradient (nil for 0), retaining it and registering a release finalizer.
func NewArrayStridedSliceGradient ¶
func NewArrayStridedSliceGradient() *ArrayStridedSliceGradient
NewArrayStridedSliceGradient creates a new ArrayStridedSliceGradient.
type ArrayStridedSliceGradientable ¶
ArrayStridedSliceGradientable is the interface implemented by ArrayStridedSliceGradient, for mocking and DI.
type ArrayStridedSliceable ¶
ArrayStridedSliceable is the interface implemented by ArrayStridedSlice, for mocking and DI.
type ArrayUnaryGradientKernel ¶
type ArrayUnaryGradientKernel struct {
ArrayMultiaryGradientKernel
}
ArrayUnaryGradientKernel is an idiomatic wrapper over the Objective-C class MPSNDArrayUnaryGradientKernel.
ArrayUnaryGradientKernel is an abstract base — you do not construct it directly. Construct one of ArrayStridedSliceGradient and pass it where a ArrayUnaryGradientKernel is accepted.
func ArrayUnaryGradientKernelFromID ¶
func ArrayUnaryGradientKernelFromID(id objc.ID) *ArrayUnaryGradientKernel
ArrayUnaryGradientKernelFromID adopts an existing Objective-C object as a ArrayUnaryGradientKernel (nil for 0), retaining it and registering a release finalizer.
type ArrayUnaryGradientKernelProvider ¶
type ArrayUnaryGradientKernelProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayUnaryGradientKernelProvider is accepted wherever a MPSNDArrayUnaryGradientKernel (or one of its subclasses) is expected.
type ArrayUnaryGradientKernelable ¶
ArrayUnaryGradientKernelable is the interface implemented by ArrayUnaryGradientKernel, for mocking and DI.
type ArrayUnaryKernel ¶
type ArrayUnaryKernel struct {
ArrayMultiaryKernel
}
ArrayUnaryKernel is an idiomatic wrapper over the Objective-C class MPSNDArrayUnaryKernel.
ArrayUnaryKernel is an abstract base — you do not construct it directly. Construct one of ArrayIdentity, ArrayStridedSlice and pass it where a ArrayUnaryKernel is accepted.
func ArrayUnaryKernelFromID ¶
func ArrayUnaryKernelFromID(id objc.ID) *ArrayUnaryKernel
ArrayUnaryKernelFromID adopts an existing Objective-C object as a ArrayUnaryKernel (nil for 0), retaining it and registering a release finalizer.
type ArrayUnaryKernelProvider ¶
type ArrayUnaryKernelProvider interface {
objref.Object
// contains filtered or unexported methods
}
ArrayUnaryKernelProvider is accepted wherever a MPSNDArrayUnaryKernel (or one of its subclasses) is expected.
type ArrayUnaryKernelable ¶
ArrayUnaryKernelable is the interface implemented by ArrayUnaryKernel, for mocking and DI.
type ArrayVectorLUTDequantize ¶
type ArrayVectorLUTDequantize struct {
ArrayMultiaryKernel
}
ArrayVectorLUTDequantize is an idiomatic wrapper over the Objective-C class MPSNDArrayVectorLUTDequantize.
It embeds ArrayMultiaryKernel, promoting that type's methods.
func ArrayVectorLUTDequantizeFromID ¶
func ArrayVectorLUTDequantizeFromID(id objc.ID) *ArrayVectorLUTDequantize
ArrayVectorLUTDequantizeFromID adopts an existing Objective-C object as a ArrayVectorLUTDequantize (nil for 0), retaining it and registering a release finalizer.
func NewArrayVectorLUTDequantize ¶ added in v0.10.0
func NewArrayVectorLUTDequantize() *ArrayVectorLUTDequantize
NewArrayVectorLUTDequantize creates a new ArrayVectorLUTDequantize.
func (*ArrayVectorLUTDequantize) SetVectorAxis ¶
func (x *ArrayVectorLUTDequantize) SetVectorAxis(vectorAxis int)
SetVectorAxis wraps the corresponding Objective-C method.
func (*ArrayVectorLUTDequantize) VectorAxis ¶
func (x *ArrayVectorLUTDequantize) VectorAxis() int
VectorAxis which axis in the destination will receive the vector component, must be less than 4.
func (*ArrayVectorLUTDequantize) WithVectorAxis ¶
func (x *ArrayVectorLUTDequantize) WithVectorAxis(vectorAxis int) *ArrayVectorLUTDequantize
WithVectorAxis which axis in the destination will receive the vector component, must be less than 4.
type ArrayVectorLUTDequantizeable ¶
type ArrayVectorLUTDequantizeable interface {
obj.Object
WithVectorAxis(vectorAxis int) *ArrayVectorLUTDequantize
VectorAxis() int
SetVectorAxis(vectorAxis int)
}
ArrayVectorLUTDequantizeable is the interface implemented by ArrayVectorLUTDequantize, for mocking and DI.
Source Files
¶
- MPSNDArrayAffineInt4Dequantize_generated.go
- MPSNDArrayAffineQuantizationDescriptor_generated.go
- MPSNDArrayBinaryKernel_generated.go
- MPSNDArrayBinaryPrimaryGradientKernel_generated.go
- MPSNDArrayBinarySecondaryGradientKernel_generated.go
- MPSNDArrayGatherGradientState_generated.go
- MPSNDArrayGatherGradient_generated.go
- MPSNDArrayGather_generated.go
- MPSNDArrayGradientState_generated.go
- MPSNDArrayIdentity_generated.go
- MPSNDArrayLUTDequantize_generated.go
- MPSNDArrayLUTQuantizationDescriptor_generated.go
- MPSNDArrayMatrixMultiplication_generated.go
- MPSNDArrayMultiaryBase_generated.go
- MPSNDArrayMultiaryGradientKernel_generated.go
- MPSNDArrayMultiaryKernel_generated.go
- MPSNDArrayQuantizationDescriptor_generated.go
- MPSNDArrayQuantizedMatrixMultiplication_generated.go
- MPSNDArrayStridedSliceGradient_generated.go
- MPSNDArrayStridedSlice_generated.go
- MPSNDArrayUnaryGradientKernel_generated.go
- MPSNDArrayUnaryKernel_generated.go
- MPSNDArrayVectorLUTDequantize_generated.go
- doc.go
- mpsndarray_enums_generated.go
- mpsndarray_providers_generated.go
- mpsndarray_runtime_generated.go