mpsndarray

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package mpsndarray provides a fluent Go API over the macOS MPSNDArray framework.

Each With… method sets one property and returns its receiver, so configuration calls can be chained.

Types

Each base type below lists the concrete types you construct and pass where the base is accepted:

Index

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 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 (aaqd *ArrayAffineQuantizationDescriptor) HasMinValue() bool

HasMinValue reports whether if yes then offset is used. See MPSNDArrayQuantizationScheme.

func (*ArrayAffineQuantizationDescriptor) HasZeroPoint

func (aaqd *ArrayAffineQuantizationDescriptor) HasZeroPoint() bool

HasZeroPoint reports whether if yes then asymmetric quantization is used. See MPSNDArrayQuantizationScheme.

func (*ArrayAffineQuantizationDescriptor) ImplicitZeroPoint

func (aaqd *ArrayAffineQuantizationDescriptor) ImplicitZeroPoint() bool

ImplicitZeroPoint reports whether 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) WithHasMinValue

func (aaqd *ArrayAffineQuantizationDescriptor) WithHasMinValue(hasMinValue bool) *ArrayAffineQuantizationDescriptor

WithHasMinValue sets if yes then offset is used. See MPSNDArrayQuantizationScheme.

func (*ArrayAffineQuantizationDescriptor) WithHasZeroPoint

func (aaqd *ArrayAffineQuantizationDescriptor) WithHasZeroPoint(hasZeroPoint bool) *ArrayAffineQuantizationDescriptor

WithHasZeroPoint sets if yes then asymmetric quantization is used. See MPSNDArrayQuantizationScheme.

func (*ArrayAffineQuantizationDescriptor) WithImplicitZeroPoint

func (aaqd *ArrayAffineQuantizationDescriptor) WithImplicitZeroPoint(implicitZeroPoint bool) *ArrayAffineQuantizationDescriptor

WithImplicitZeroPoint sets 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 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 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 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 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 NewArrayGather

func NewArrayGather() *ArrayGather

NewArrayGather creates a new ArrayGather.

func (*ArrayGather) Axis

func (ag *ArrayGather) Axis() int

Axis returns the axis along which to apply the gather operation. Defaults to zero.

func (*ArrayGather) WithAxis

func (ag *ArrayGather) WithAxis(axis int) *ArrayGather

WithAxis sets 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 ArrayGradientState

type ArrayGradientState struct {
	objref.Handle
}

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 (ags *ArrayGradientState) Description() string

Description returns the object's -description text.

func (*ArrayGradientState) IsEqual added in v0.10.0

func (ags *ArrayGradientState) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ArrayGradientState) IsKind added in v0.10.0

func (ags *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 (ags *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 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 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 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 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 (amm *ArrayMatrixMultiplication) Alpha() float64

Alpha returns 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 (amm *ArrayMatrixMultiplication) Beta() float64

Beta returns 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) WithAlpha

WithAlpha sets 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

WithBeta sets 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 ArrayMultiaryBase

type ArrayMultiaryBase struct {
	objref.Handle
}

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 (amb *ArrayMultiaryBase) Description() string

Description returns the object's -description text.

func (*ArrayMultiaryBase) DestinationArrayDescriptorForSourceArraysSourceState

func (amb *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 (amb *ArrayMultiaryBase) EncodeWithCoder(coder obj.Object)

EncodeWithCoder initialize a MPSNDArrayMultiaryKernel from a NSCoder

func (*ArrayMultiaryBase) IsEqual added in v0.10.0

func (amb *ArrayMultiaryBase) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ArrayMultiaryBase) IsKind added in v0.10.0

func (amb *ArrayMultiaryBase) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ArrayMultiaryBase) ResultStateForSourceArraysSourceStatesDestinationArray

func (amb *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 (amb *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 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 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 ArrayQuantizationDescriptor

type ArrayQuantizationDescriptor struct {
	objref.Handle
}

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 (aqd *ArrayQuantizationDescriptor) Description() string

Description returns the object's -description text.

func (*ArrayQuantizationDescriptor) IsEqual added in v0.10.0

func (aqd *ArrayQuantizationDescriptor) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ArrayQuantizationDescriptor) IsKind added in v0.10.0

func (aqd *ArrayQuantizationDescriptor) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ArrayQuantizationDescriptor) QuantizationScheme

func (aqd *ArrayQuantizationDescriptor) QuantizationScheme() ArrayQuantizationScheme

QuantizationScheme returns the quantization scheme for this descriptor. The default is MPSNDArrayQuantizationTypeNone.

func (*ArrayQuantizationDescriptor) String added in v0.10.0

func (aqd *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 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

WithAlpha sets 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

WithBeta sets 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 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 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 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 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) VectorAxis

func (avld *ArrayVectorLUTDequantize) VectorAxis() int

VectorAxis returns which axis in the destination will receive the vector component, must be less than 4.

func (*ArrayVectorLUTDequantize) WithVectorAxis

func (avld *ArrayVectorLUTDequantize) WithVectorAxis(vectorAxis int) *ArrayVectorLUTDequantize

WithVectorAxis sets which axis in the destination will receive the vector component, must be less than 4.

Jump to

Keyboard shortcuts

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