mpsndarray

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayAffineInt4Dequantize

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

ArrayAffineInt4Dequantize wraps raw.MPSNDArrayAffineInt4Dequantize with a fluent Go API.

func ArrayAffineInt4DequantizeFromID

func ArrayAffineInt4DequantizeFromID(id objc.ID) *ArrayAffineInt4Dequantize

ArrayAffineInt4DequantizeFromID adopts an existing object pointer as a ArrayAffineInt4Dequantize (nil for 0).

func NewArrayAffineInt4DequantizeWithDeviceQuantizationDescriptor

func NewArrayAffineInt4DequantizeWithDeviceQuantizationDescriptor(device metal.MTLDevice, quantizationDescriptor *raw.MPSNDArrayAffineQuantizationDescriptor) *ArrayAffineInt4Dequantize

@abstract Initializes a kernel for 4-bit affine dequantization. @param device The Metal device to be used with this kernel. @param quantizationDescriptor Describes the quantization scheme. @result A new vector LUT dequantization kernel.

NewArrayAffineInt4DequantizeWithDeviceQuantizationDescriptor creates a new ArrayAffineInt4Dequantize.

func (*ArrayAffineInt4Dequantize) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayAffineInt4Dequantize) Unwrap

Unwrap returns the underlying raw.MPSNDArrayAffineInt4Dequantize.

func (*ArrayAffineInt4Dequantize) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayAffineInt4Dequantize) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayAffineInt4Dequantize

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayAffineInt4Dequantizeable

type ArrayAffineInt4Dequantizeable interface {
	Unwrap() *raw.MPSNDArrayAffineInt4Dequantize
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayAffineInt4Dequantize
}

ArrayAffineInt4Dequantizeable is the interface implemented by ArrayAffineInt4Dequantize, for mocking and DI.

type ArrayAffineQuantizationDescriptor

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

ArrayAffineQuantizationDescriptor wraps raw.MPSNDArrayAffineQuantizationDescriptor with a fluent Go API.

func ArrayAffineQuantizationDescriptorFromID

func ArrayAffineQuantizationDescriptorFromID(id objc.ID) *ArrayAffineQuantizationDescriptor

ArrayAffineQuantizationDescriptorFromID adopts an existing object pointer as a ArrayAffineQuantizationDescriptor (nil for 0).

func NewArrayAffineQuantizationDescriptor

func NewArrayAffineQuantizationDescriptor() *ArrayAffineQuantizationDescriptor

NewArrayAffineQuantizationDescriptor creates a new ArrayAffineQuantizationDescriptor.

func NewArrayAffineQuantizationDescriptorWithDataTypeHasZeroPointHasMinValue

func NewArrayAffineQuantizationDescriptorWithDataTypeHasZeroPointHasMinValue(quantizationDataType mpscore.MPSDataType, hasZeroPoint bool, hasMinValue bool) *ArrayAffineQuantizationDescriptor

@abstract Initializes an affine quantization descriptor. @param quantizationDataType Which quantized datatype is used. @param hasZeroPoint A flag indicating that a zero-point input is expected. @param hasMinValue A flag indicating that a minimum value input is expected. @result A new quantization descriptor.

NewArrayAffineQuantizationDescriptorWithDataTypeHasZeroPointHasMinValue creates a new ArrayAffineQuantizationDescriptor.

func (*ArrayAffineQuantizationDescriptor) HasMinValue

func (x *ArrayAffineQuantizationDescriptor) HasMinValue() bool

@property hasMinValue @abstract If yes then offset is used. See MPSNDArrayQuantizationScheme.

HasMinValue calls the underlying HasMinValue.

func (*ArrayAffineQuantizationDescriptor) HasZeroPoint

func (x *ArrayAffineQuantizationDescriptor) HasZeroPoint() bool

@property hasZeroPoint @abstract If yes then asymmetric quantization is used. See MPSNDArrayQuantizationScheme.

HasZeroPoint calls the underlying HasZeroPoint.

func (*ArrayAffineQuantizationDescriptor) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayAffineQuantizationDescriptor) ImplicitZeroPoint

func (x *ArrayAffineQuantizationDescriptor) ImplicitZeroPoint() bool

@property implicitZeroPoint @abstract 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;

ImplicitZeroPoint calls the underlying ImplicitZeroPoint.

func (*ArrayAffineQuantizationDescriptor) SetHasMinValue

func (x *ArrayAffineQuantizationDescriptor) SetHasMinValue(hasMinValue bool)

SetHasMinValue calls the underlying SetHasMinValue.

func (*ArrayAffineQuantizationDescriptor) SetHasZeroPoint

func (x *ArrayAffineQuantizationDescriptor) SetHasZeroPoint(hasZeroPoint bool)

SetHasZeroPoint calls the underlying SetHasZeroPoint.

func (*ArrayAffineQuantizationDescriptor) SetImplicitZeroPoint

func (x *ArrayAffineQuantizationDescriptor) SetImplicitZeroPoint(implicitZeroPoint bool)

SetImplicitZeroPoint calls the underlying SetImplicitZeroPoint.

func (*ArrayAffineQuantizationDescriptor) Unwrap

Unwrap returns the underlying raw.MPSNDArrayAffineQuantizationDescriptor.

func (*ArrayAffineQuantizationDescriptor) WithHasMinValue

@property hasMinValue @abstract If yes then offset is used. See MPSNDArrayQuantizationScheme.

WithHasMinValue sets the hasMinValue property and returns the receiver for chaining.

func (*ArrayAffineQuantizationDescriptor) WithHasZeroPoint

@property hasZeroPoint @abstract If yes then asymmetric quantization is used. See MPSNDArrayQuantizationScheme.

WithHasZeroPoint sets the hasZeroPoint property and returns the receiver for chaining.

func (*ArrayAffineQuantizationDescriptor) WithImplicitZeroPoint

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

@property implicitZeroPoint @abstract 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;

WithImplicitZeroPoint sets the implicitZeroPoint property and returns the receiver for chaining.

type ArrayAffineQuantizationDescriptorable

type ArrayAffineQuantizationDescriptorable interface {
	Unwrap() *raw.MPSNDArrayAffineQuantizationDescriptor
	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 {
	// contains filtered or unexported fields
}

ArrayBinaryKernel wraps raw.MPSNDArrayBinaryKernel with a fluent Go API.

func ArrayBinaryKernelFromID

func ArrayBinaryKernelFromID(id objc.ID) *ArrayBinaryKernel

ArrayBinaryKernelFromID adopts an existing object pointer as a ArrayBinaryKernel (nil for 0).

func NewArrayBinaryKernelWithDevice

func NewArrayBinaryKernelWithDevice(device metal.MTLDevice) *ArrayBinaryKernel

NewArrayBinaryKernelWithDevice creates a new ArrayBinaryKernel.

func (*ArrayBinaryKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArray

func (x *ArrayBinaryKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray) *mpscore.MPSNDArray

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param primarySourceArray The primary source for the filter in an NSArray. @param secondarySourceArray The secondary source for the filter in an NSArray. @result A newly allocated MPSNDArray that will contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandBufferPrimarySourceArraySecondarySourceArray calls the underlying EncodeToCommandBufferPrimarySourceArraySecondarySourceArray.

func (*ArrayBinaryKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayDestinationArray

func (x *ArrayBinaryKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayDestinationArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, destination *mpscore.MPSNDArray)

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param primarySourceArray The primary source for the filter in an NSArray. @param secondarySourceArray The secondary source for the filter in an NSArray. @param destination The NDArray to receive the result

EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayDestinationArray calls the underlying EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayDestinationArray.

func (*ArrayBinaryKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateDestinationArray

func (x *ArrayBinaryKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateDestinationArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, outGradientState *mpscore.MPSState, destination *mpscore.MPSNDArray)

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param primarySourceArray The primary source for the filter in an NSArray. @param secondarySourceArray The secondary source for the filter in an NSArray. @param outGradientState The output gradient state to record the operation for later use by gradient @param destination A destination array to contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateDestinationArray calls the underlying EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateDestinationArray.

func (*ArrayBinaryKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateOutputStateIsTemporary

func (x *ArrayBinaryKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateOutputStateIsTemporary(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, outGradientState *mpscore.MPSState, outputStateIsTemporary bool) *mpscore.MPSNDArray

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param primarySourceArray The primary source for the filter in an NSArray. @param secondarySourceArray The secondary source for the filter in an NSArray. @param outGradientState If non-nil, the address output gradient state is written to this address @param outputStateIsTemporary If YES, the state if any will be allocated to contain temporary textures and buffers as needed @result A newly allocated MPSNDArray that will contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateOutputStateIsTemporary calls the underlying EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateOutputStateIsTemporary.

func (*ArrayBinaryKernel) ID

func (x *ArrayBinaryKernel) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayBinaryKernel) PrimaryDilationRates

func (x *ArrayBinaryKernel) PrimaryDilationRates() raw.MPSNDArraySizes

@property primaryDilationRate @abstract The stride in each dimension from one PSF tap to an adjacent PSF tap. Default: 1

PrimaryDilationRates calls the underlying PrimaryDilationRates.

func (*ArrayBinaryKernel) PrimaryEdgeMode

func (x *ArrayBinaryKernel) PrimaryEdgeMode() mpscore.MPSImageEdgeMode

@property primaryEdgeMode @abstract The edge mode used for a source NDArray Default: MPSImageEdgeModeZero

PrimaryEdgeMode calls the underlying PrimaryEdgeMode.

func (*ArrayBinaryKernel) PrimaryKernelSizes

func (x *ArrayBinaryKernel) PrimaryKernelSizes() raw.MPSNDArraySizes

@property primaryKernelSizes @abstract The diameters of the point spread function in each dimension for a source NDArray Default: 1

PrimaryKernelSizes calls the underlying PrimaryKernelSizes.

func (*ArrayBinaryKernel) PrimaryOffsets

func (x *ArrayBinaryKernel) PrimaryOffsets() raw.MPSNDArrayOffsets

@property primaryOffsets @abstract The coordinate of the position read from this source array which is used to calculate the result value at [0,0,0,....] If the position read is actually a contiguous region (e.g. the area covered by a convolution kernel) then this is the center of that region, rounded down, for each dimension. Default: 0,0,0...

PrimaryOffsets calls the underlying PrimaryOffsets.

func (*ArrayBinaryKernel) PrimaryStrides

func (x *ArrayBinaryKernel) PrimaryStrides() raw.MPSNDArrayOffsets

@property primaryStrides @abstract If the filter is a "backwards" filter such as a gradient filter or convolution transpose, then this is the upsampling ratio and zeros are inserted in the result. Default: 1

PrimaryStrides calls the underlying PrimaryStrides.

func (*ArrayBinaryKernel) SecondaryDilationRates

func (x *ArrayBinaryKernel) SecondaryDilationRates() raw.MPSNDArraySizes

@property secondaryDilationRate @abstract The stride in each dimension from one PSF tap to an adjacent PSF tap. Default: 1

SecondaryDilationRates calls the underlying SecondaryDilationRates.

func (*ArrayBinaryKernel) SecondaryEdgeMode

func (x *ArrayBinaryKernel) SecondaryEdgeMode() mpscore.MPSImageEdgeMode

@property secondaryEdgeMode @abstract The edge mode used for a source NDArray Default: MPSImageEdgeModeZero

SecondaryEdgeMode calls the underlying SecondaryEdgeMode.

func (*ArrayBinaryKernel) SecondaryKernelSizes

func (x *ArrayBinaryKernel) SecondaryKernelSizes() raw.MPSNDArraySizes

@property secondaryKernelSizes @abstract The diameters of the point spread function in each dimension for a source NDArray Default: 1

SecondaryKernelSizes calls the underlying SecondaryKernelSizes.

func (*ArrayBinaryKernel) SecondaryOffsets

func (x *ArrayBinaryKernel) SecondaryOffsets() raw.MPSNDArrayOffsets

@property secondaryOffsets @abstract The coordinate of the position read from this source array which is used to calculate the result value at [0,0,0,....] If the position read is actually a contiguous region (e.g. the area covered by a convolution kernel) then this is the center of that region, rounded down, for each dimension. Default: 0,0,0...

SecondaryOffsets calls the underlying SecondaryOffsets.

func (*ArrayBinaryKernel) SecondaryStrides

func (x *ArrayBinaryKernel) SecondaryStrides() raw.MPSNDArrayOffsets

@property secondaryStrides @abstract If the filter is a "backwards" filter such as a gradient filter or convolution transpose, then this is the upsampling ratio and zeros are inserted in the result. Default: 1

SecondaryStrides calls the underlying SecondaryStrides.

func (*ArrayBinaryKernel) Unwrap

Unwrap returns the underlying raw.MPSNDArrayBinaryKernel.

func (*ArrayBinaryKernel) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayBinaryKernel) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayBinaryKernel

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayBinaryKernelProvider

type ArrayBinaryKernelProvider interface {
	// contains filtered or unexported methods
}

ArrayBinaryKernelProvider is implemented by ArrayBinaryKernel and any idiomatic type wrapping a MPSNDArrayBinaryKernel subclass.

type ArrayBinaryKernelable

type ArrayBinaryKernelable interface {
	Unwrap() *raw.MPSNDArrayBinaryKernel
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayBinaryKernel
	EncodeToCommandBufferPrimarySourceArraySecondarySourceArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray) *mpscore.MPSNDArray
	EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayDestinationArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, destination *mpscore.MPSNDArray)
	EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateOutputStateIsTemporary(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, outGradientState *mpscore.MPSState, outputStateIsTemporary bool) *mpscore.MPSNDArray
	EncodeToCommandBufferPrimarySourceArraySecondarySourceArrayResultStateDestinationArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, outGradientState *mpscore.MPSState, destination *mpscore.MPSNDArray)
	PrimaryOffsets() raw.MPSNDArrayOffsets
	PrimaryEdgeMode() mpscore.MPSImageEdgeMode
	PrimaryKernelSizes() raw.MPSNDArraySizes
	PrimaryStrides() raw.MPSNDArrayOffsets
	PrimaryDilationRates() raw.MPSNDArraySizes
	SecondaryOffsets() raw.MPSNDArrayOffsets
	SecondaryEdgeMode() mpscore.MPSImageEdgeMode
	SecondaryKernelSizes() raw.MPSNDArraySizes
	SecondaryStrides() raw.MPSNDArrayOffsets
	SecondaryDilationRates() raw.MPSNDArraySizes
}

ArrayBinaryKernelable is the interface implemented by ArrayBinaryKernel, for mocking and DI.

type ArrayBinaryPrimaryGradientKernel

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

ArrayBinaryPrimaryGradientKernel wraps raw.MPSNDArrayBinaryPrimaryGradientKernel with a fluent Go API.

func ArrayBinaryPrimaryGradientKernelFromID

func ArrayBinaryPrimaryGradientKernelFromID(id objc.ID) *ArrayBinaryPrimaryGradientKernel

ArrayBinaryPrimaryGradientKernelFromID adopts an existing object pointer as a ArrayBinaryPrimaryGradientKernel (nil for 0).

func NewArrayBinaryPrimaryGradientKernelWithCoderDevice

func NewArrayBinaryPrimaryGradientKernelWithCoderDevice(coder *foundation.NSCoder, device metal.MTLDevice) *ArrayBinaryPrimaryGradientKernel

NewArrayBinaryPrimaryGradientKernelWithCoderDevice creates a new ArrayBinaryPrimaryGradientKernel.

func (*ArrayBinaryPrimaryGradientKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState

func (x *ArrayBinaryPrimaryGradientKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState) *mpscore.MPSNDArray

EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState calls the underlying EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState.

func (*ArrayBinaryPrimaryGradientKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray

func (x *ArrayBinaryPrimaryGradientKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState, destination *mpscore.MPSNDArray)

EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray calls the underlying EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray.

func (*ArrayBinaryPrimaryGradientKernel) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayBinaryPrimaryGradientKernel) Unwrap

Unwrap returns the underlying raw.MPSNDArrayBinaryPrimaryGradientKernel.

func (*ArrayBinaryPrimaryGradientKernel) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayBinaryPrimaryGradientKernel) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayBinaryPrimaryGradientKernel

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayBinaryPrimaryGradientKernelProvider

type ArrayBinaryPrimaryGradientKernelProvider interface {
	// contains filtered or unexported methods
}

ArrayBinaryPrimaryGradientKernelProvider is implemented by ArrayBinaryPrimaryGradientKernel and any idiomatic type wrapping a MPSNDArrayBinaryPrimaryGradientKernel subclass.

type ArrayBinaryPrimaryGradientKernelable

type ArrayBinaryPrimaryGradientKernelable interface {
	Unwrap() *raw.MPSNDArrayBinaryPrimaryGradientKernel
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayBinaryPrimaryGradientKernel
	EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState) *mpscore.MPSNDArray
	EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState, destination *mpscore.MPSNDArray)
}

ArrayBinaryPrimaryGradientKernelable is the interface implemented by ArrayBinaryPrimaryGradientKernel, for mocking and DI.

type ArrayBinarySecondaryGradientKernel

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

ArrayBinarySecondaryGradientKernel wraps raw.MPSNDArrayBinarySecondaryGradientKernel with a fluent Go API.

func ArrayBinarySecondaryGradientKernelFromID

func ArrayBinarySecondaryGradientKernelFromID(id objc.ID) *ArrayBinarySecondaryGradientKernel

ArrayBinarySecondaryGradientKernelFromID adopts an existing object pointer as a ArrayBinarySecondaryGradientKernel (nil for 0).

func NewArrayBinarySecondaryGradientKernelWithCoderDevice

func NewArrayBinarySecondaryGradientKernelWithCoderDevice(coder *foundation.NSCoder, device metal.MTLDevice) *ArrayBinarySecondaryGradientKernel

NewArrayBinarySecondaryGradientKernelWithCoderDevice creates a new ArrayBinarySecondaryGradientKernel.

func (*ArrayBinarySecondaryGradientKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState

func (x *ArrayBinarySecondaryGradientKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState) *mpscore.MPSNDArray

EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState calls the underlying EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState.

func (*ArrayBinarySecondaryGradientKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray

func (x *ArrayBinarySecondaryGradientKernel) EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState, destination *mpscore.MPSNDArray)

EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray calls the underlying EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray.

func (*ArrayBinarySecondaryGradientKernel) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayBinarySecondaryGradientKernel) Unwrap

Unwrap returns the underlying raw.MPSNDArrayBinarySecondaryGradientKernel.

func (*ArrayBinarySecondaryGradientKernel) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayBinarySecondaryGradientKernel) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayBinarySecondaryGradientKernel

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayBinarySecondaryGradientKernelable

type ArrayBinarySecondaryGradientKernelable interface {
	Unwrap() *raw.MPSNDArrayBinarySecondaryGradientKernel
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayBinarySecondaryGradientKernel
	EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientState(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState) *mpscore.MPSNDArray
	EncodeToCommandBufferPrimarySourceArraySecondarySourceArraySourceGradientGradientStateDestinationArray(cmdBuf metal.MTLCommandBuffer, primarySourceArray *mpscore.MPSNDArray, secondarySourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState, destination *mpscore.MPSNDArray)
}

ArrayBinarySecondaryGradientKernelable is the interface implemented by ArrayBinarySecondaryGradientKernel, for mocking and DI.

type ArrayGather

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

ArrayGather wraps raw.MPSNDArrayGather with a fluent Go API.

func ArrayGatherFromID

func ArrayGatherFromID(id objc.ID) *ArrayGather

ArrayGatherFromID adopts an existing object pointer as a ArrayGather (nil for 0).

func NewArrayGather

func NewArrayGather() *ArrayGather

NewArrayGather creates a new ArrayGather.

func (*ArrayGather) Axis

func (x *ArrayGather) Axis() uint

@property axis @abstract The axis along which to apply the gather operation. Defaults to zero.

Axis calls the underlying Axis.

func (*ArrayGather) ID

func (x *ArrayGather) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayGather) SetAxis

func (x *ArrayGather) SetAxis(axis uint)

SetAxis calls the underlying SetAxis.

func (*ArrayGather) Unwrap

func (x *ArrayGather) Unwrap() *raw.MPSNDArrayGather

Unwrap returns the underlying raw.MPSNDArrayGather.

func (*ArrayGather) WithAxis

func (x *ArrayGather) WithAxis(axis uint) *ArrayGather

@property axis @abstract The axis along which to apply the gather operation. Defaults to zero.

WithAxis sets the axis property and returns the receiver for chaining.

func (*ArrayGather) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayGather) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayGather

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayGatherGradient

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

ArrayGatherGradient wraps raw.MPSNDArrayGatherGradient with a fluent Go API.

func ArrayGatherGradientFromID

func ArrayGatherGradientFromID(id objc.ID) *ArrayGatherGradient

ArrayGatherGradientFromID adopts an existing object pointer as a ArrayGatherGradient (nil for 0).

func NewArrayGatherGradient

func NewArrayGatherGradient() *ArrayGatherGradient

NewArrayGatherGradient creates a new ArrayGatherGradient.

func (*ArrayGatherGradient) ID

func (x *ArrayGatherGradient) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayGatherGradient) Unwrap

Unwrap returns the underlying raw.MPSNDArrayGatherGradient.

func (*ArrayGatherGradient) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayGatherGradient) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayGatherGradient

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayGatherGradientState

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

ArrayGatherGradientState wraps raw.MPSNDArrayGatherGradientState with a fluent Go API.

func ArrayGatherGradientStateFromID

func ArrayGatherGradientStateFromID(id objc.ID) *ArrayGatherGradientState

ArrayGatherGradientStateFromID adopts an existing object pointer as a ArrayGatherGradientState (nil for 0).

func NewArrayGatherGradientState

func NewArrayGatherGradientState() *ArrayGatherGradientState

NewArrayGatherGradientState creates a new ArrayGatherGradientState.

func (*ArrayGatherGradientState) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayGatherGradientState) Unwrap

Unwrap returns the underlying raw.MPSNDArrayGatherGradientState.

type ArrayGatherGradientStateable

type ArrayGatherGradientStateable interface {
	Unwrap() *raw.MPSNDArrayGatherGradientState
}

ArrayGatherGradientStateable is the interface implemented by ArrayGatherGradientState, for mocking and DI.

type ArrayGatherGradientable

type ArrayGatherGradientable interface {
	Unwrap() *raw.MPSNDArrayGatherGradient
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayGatherGradient
}

ArrayGatherGradientable is the interface implemented by ArrayGatherGradient, for mocking and DI.

type ArrayGatherable

type ArrayGatherable interface {
	Unwrap() *raw.MPSNDArrayGather
	WithAxis(axis uint) *ArrayGather
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayGather
	Axis() uint
	SetAxis(axis uint)
}

ArrayGatherable is the interface implemented by ArrayGather, for mocking and DI.

type ArrayGradientState

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

ArrayGradientState wraps raw.MPSNDArrayGradientState with a fluent Go API.

func ArrayGradientStateFromID

func ArrayGradientStateFromID(id objc.ID) *ArrayGradientState

ArrayGradientStateFromID adopts an existing object pointer as a ArrayGradientState (nil for 0).

func NewArrayGradientState

func NewArrayGradientState() *ArrayGradientState

NewArrayGradientState creates a new ArrayGradientState.

func (*ArrayGradientState) ID

func (x *ArrayGradientState) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayGradientState) Unwrap

Unwrap returns the underlying raw.MPSNDArrayGradientState.

type ArrayGradientStateProvider

type ArrayGradientStateProvider interface {
	// contains filtered or unexported methods
}

ArrayGradientStateProvider is implemented by ArrayGradientState and any idiomatic type wrapping a MPSNDArrayGradientState subclass.

type ArrayGradientStateable

type ArrayGradientStateable interface {
	Unwrap() *raw.MPSNDArrayGradientState
}

ArrayGradientStateable is the interface implemented by ArrayGradientState, for mocking and DI.

type ArrayIdentity

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

ArrayIdentity wraps raw.MPSNDArrayIdentity with a fluent Go API.

func ArrayIdentityFromID

func ArrayIdentityFromID(id objc.ID) *ArrayIdentity

ArrayIdentityFromID adopts an existing object pointer as a ArrayIdentity (nil for 0).

func NewArrayIdentityWithDevice

func NewArrayIdentityWithDevice(device metal.MTLDevice) *ArrayIdentity

NewArrayIdentityWithDevice creates a new ArrayIdentity.

func (*ArrayIdentity) ID

func (x *ArrayIdentity) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayIdentity) ReshapeWithCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray

func (x *ArrayIdentity) ReshapeWithCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, numberOfDimensions uint, dimensionSizes *uint, destinationArray *mpscore.MPSNDArray) *mpscore.MPSNDArray

@abstract Do a reshape operation, either by trying to alias the array, returning an arrayview, or by copying. @param cmdBuf `MTLCommandBuffer` into which to encode the kernel, or to create a temporary array alias. @param sourceArray Source array. If this function returns a non-nil result, then the readCount of `sourceArray` is decremented. @param numberOfDimensions The number of dimensions of the NDArray. @param dimensionSizes The extents of each dimensions of the NDArray. @param destinationArray If not nil, then the result of reshape will be copied to this. Shape of `destinationArray` must match `shape`. @result If `destinationArray` is not nil, then `destinationArray`. Otherwise aliasing is tried, and if aliasing is not possible due to existing slices or transposes nil is returned. If aliasing is successful, then a new arrayview of `sourceArray` is returned; If `sourceArray` is a `MPSTemporaryArray` then a `MPSTemporaryArray` is returned referencing the same data, otherwise a `MPSNDArray` type result is returned.

ReshapeWithCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray calls the underlying ReshapeWithCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray.

func (*ArrayIdentity) ReshapeWithCommandBufferSourceArrayShapeDestinationArray

func (x *ArrayIdentity) ReshapeWithCommandBufferSourceArrayShapeDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, shape unsafe.Pointer, destinationArray *mpscore.MPSNDArray) *mpscore.MPSNDArray

@abstract Do a reshape operation, either by trying to alias the array, returning an arrayview, or by copying. @param cmdBuf `MTLCommandBuffer` into which to encode the kernel, or to create a temporary array alias. @param sourceArray Source array. If this function returns a non-nil result, then the readCount of `sourceArray` is decremented. @param shape The new shape, given in TF dimension ordering (as always with MPSShape). @param destinationArray If not nil, then the result of reshape will be copied to this. Shape of `destinationArray` must match `shape`. @result If `destinationArray` is not nil, then `destinationArray`. Otherwise aliasing is tried, and if aliasing is not possible due to existing slices or transposes nil is returned. If aliasing is successful, then a new arrayview of `sourceArray` is returned; If `sourceArray` is a `MPSTemporaryArray` then a `MPSTemporaryArray` is returned referencing the same data, otherwise a `MPSNDArray` type result is returned.

ReshapeWithCommandBufferSourceArrayShapeDestinationArray calls the underlying ReshapeWithCommandBufferSourceArrayShapeDestinationArray.

func (*ArrayIdentity) ReshapeWithCommandEncoderCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray

func (x *ArrayIdentity) ReshapeWithCommandEncoderCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray(encoder metal.MTLComputeCommandEncoder, cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, numberOfDimensions uint, dimensionSizes *uint, destinationArray *mpscore.MPSNDArray) *mpscore.MPSNDArray

@abstract Do a reshape operation, either by trying to alias the array, returning an arrayview, or by copying. @param encoder The `MTLComputeCommandEncoder` that the kernel will be encoded with. @param cmdBuf `MTLCommandBuffer` into which to encode the kernel, or to create a temporary array alias. @param sourceArray Source array. If this function returns a non-nil result, then the readCount of `sourceArray` is decremented. @param numberOfDimensions The number of dimensions of the NDArray. @param dimensionSizes The extents of each dimensions of the NDArray. @param destinationArray If not nil, then the result of reshape will be copied to this. Shape of `destinationArray` must match `shape`. @result If `destinationArray` is not nil, then `destinationArray`. Otherwise aliasing is tried, and if aliasing is not possible due to existing slices or transposes nil is returned. If aliasing is successful, then a new arrayview of `sourceArray` is returned; If `sourceArray` is a `MPSTemporaryArray` then a `MPSTemporaryArray` is returned referencing the same data, otherwise a `MPSNDArray` type result is returned.

ReshapeWithCommandEncoderCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray calls the underlying ReshapeWithCommandEncoderCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray.

func (*ArrayIdentity) ReshapeWithCommandEncoderCommandBufferSourceArrayShapeDestinationArray

func (x *ArrayIdentity) ReshapeWithCommandEncoderCommandBufferSourceArrayShapeDestinationArray(encoder metal.MTLComputeCommandEncoder, cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, shape unsafe.Pointer, destinationArray *mpscore.MPSNDArray) *mpscore.MPSNDArray

@abstract Do a reshape operation, either by trying to alias the array, returning an arrayview, or by copying. @param encoder The `MTLComputeCommandEncoder` that the kernel will be encoded with. @param cmdBuf `MTLCommandBuffer` into which to encode the kernel, or to create a temporary array alias. @param sourceArray Source array. If this function returns a non-nil result, then the readCount of `sourceArray` is decremented. @param shape The new shape, given in TF dimension ordering (as always with MPSShape). @param destinationArray If not nil, then the result of reshape will be copied to this. Shape of `destinationArray` must match `shape`. @result If `destinationArray` is not nil, then `destinationArray`. Otherwise aliasing is tried, and if aliasing is not possible due to existing slices or transposes nil is returned. If aliasing is successful, then a new arrayview of `sourceArray` is returned; If `sourceArray` is a `MPSTemporaryArray` then a `MPSTemporaryArray` is returned referencing the same data, otherwise a `MPSNDArray` type result is returned.

ReshapeWithCommandEncoderCommandBufferSourceArrayShapeDestinationArray calls the underlying ReshapeWithCommandEncoderCommandBufferSourceArrayShapeDestinationArray.

func (*ArrayIdentity) Unwrap

func (x *ArrayIdentity) Unwrap() *raw.MPSNDArrayIdentity

Unwrap returns the underlying raw.MPSNDArrayIdentity.

func (*ArrayIdentity) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayIdentity) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayIdentity

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayIdentityable

type ArrayIdentityable interface {
	Unwrap() *raw.MPSNDArrayIdentity
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayIdentity
	ReshapeWithCommandBufferSourceArrayShapeDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, shape unsafe.Pointer, destinationArray *mpscore.MPSNDArray) *mpscore.MPSNDArray
	ReshapeWithCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, numberOfDimensions uint, dimensionSizes *uint, destinationArray *mpscore.MPSNDArray) *mpscore.MPSNDArray
	ReshapeWithCommandEncoderCommandBufferSourceArrayShapeDestinationArray(encoder metal.MTLComputeCommandEncoder, cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, shape unsafe.Pointer, destinationArray *mpscore.MPSNDArray) *mpscore.MPSNDArray
	ReshapeWithCommandEncoderCommandBufferSourceArrayDimensionCountDimensionSizesDestinationArray(encoder metal.MTLComputeCommandEncoder, cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, numberOfDimensions uint, dimensionSizes *uint, destinationArray *mpscore.MPSNDArray) *mpscore.MPSNDArray
}

ArrayIdentityable is the interface implemented by ArrayIdentity, for mocking and DI.

type ArrayLUTDequantize

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

ArrayLUTDequantize wraps raw.MPSNDArrayLUTDequantize with a fluent Go API.

func ArrayLUTDequantizeFromID

func ArrayLUTDequantizeFromID(id objc.ID) *ArrayLUTDequantize

ArrayLUTDequantizeFromID adopts an existing object pointer as a ArrayLUTDequantize (nil for 0).

func NewArrayLUTDequantizeWithDevice

func NewArrayLUTDequantizeWithDevice(device metal.MTLDevice) *ArrayLUTDequantize

NewArrayLUTDequantizeWithDevice creates a new ArrayLUTDequantize.

func (*ArrayLUTDequantize) ID

func (x *ArrayLUTDequantize) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayLUTDequantize) Unwrap

Unwrap returns the underlying raw.MPSNDArrayLUTDequantize.

func (*ArrayLUTDequantize) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayLUTDequantize) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayLUTDequantize

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayLUTDequantizeable

type ArrayLUTDequantizeable interface {
	Unwrap() *raw.MPSNDArrayLUTDequantize
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayLUTDequantize
}

ArrayLUTDequantizeable is the interface implemented by ArrayLUTDequantize, for mocking and DI.

type ArrayLUTQuantizationDescriptor

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

ArrayLUTQuantizationDescriptor wraps raw.MPSNDArrayLUTQuantizationDescriptor with a fluent Go API.

func ArrayLUTQuantizationDescriptorFromID

func ArrayLUTQuantizationDescriptorFromID(id objc.ID) *ArrayLUTQuantizationDescriptor

ArrayLUTQuantizationDescriptorFromID adopts an existing object pointer as a ArrayLUTQuantizationDescriptor (nil for 0).

func NewArrayLUTQuantizationDescriptorWithDataType

func NewArrayLUTQuantizationDescriptorWithDataType(quantizationDataType mpscore.MPSDataType) *ArrayLUTQuantizationDescriptor

@abstract Initializes a scalar lookup-table quantization descriptor. @param quantizationDataType Which quantized datatype is used. @result A new quantization descriptor.

NewArrayLUTQuantizationDescriptorWithDataType creates a new ArrayLUTQuantizationDescriptor.

func NewArrayLUTQuantizationDescriptorWithDataTypeVectorAxis

func NewArrayLUTQuantizationDescriptorWithDataTypeVectorAxis(quantizationDataType mpscore.MPSDataType, vectorAxis uint) *ArrayLUTQuantizationDescriptor

@abstract Initializes a vector lookup-table quantization descriptor. @param quantizationDataType Which quantized datatype is used. @param vectorAxis The quantization vector axis - this axis will receive the vector component in the destination. @result A new quantization descriptor.

NewArrayLUTQuantizationDescriptorWithDataTypeVectorAxis creates a new ArrayLUTQuantizationDescriptor.

func (*ArrayLUTQuantizationDescriptor) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayLUTQuantizationDescriptor) Unwrap

Unwrap returns the underlying raw.MPSNDArrayLUTQuantizationDescriptor.

type ArrayLUTQuantizationDescriptorable

type ArrayLUTQuantizationDescriptorable interface {
	Unwrap() *raw.MPSNDArrayLUTQuantizationDescriptor
}

ArrayLUTQuantizationDescriptorable is the interface implemented by ArrayLUTQuantizationDescriptor, for mocking and DI.

type ArrayMatrixMultiplication

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

ArrayMatrixMultiplication wraps raw.MPSNDArrayMatrixMultiplication with a fluent Go API.

func ArrayMatrixMultiplicationFromID

func ArrayMatrixMultiplicationFromID(id objc.ID) *ArrayMatrixMultiplication

ArrayMatrixMultiplicationFromID adopts an existing object pointer as a ArrayMatrixMultiplication (nil for 0).

func NewArrayMatrixMultiplication

func NewArrayMatrixMultiplication() *ArrayMatrixMultiplication

NewArrayMatrixMultiplication creates a new ArrayMatrixMultiplication.

func (*ArrayMatrixMultiplication) Alpha

@property alpha @discussion 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.

Alpha calls the underlying Alpha.

func (*ArrayMatrixMultiplication) Beta

@property beta @discussion 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.

Beta calls the underlying Beta.

func (*ArrayMatrixMultiplication) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayMatrixMultiplication) SetAlpha

func (x *ArrayMatrixMultiplication) SetAlpha(alpha float64)

SetAlpha calls the underlying SetAlpha.

func (*ArrayMatrixMultiplication) SetBeta

func (x *ArrayMatrixMultiplication) SetBeta(beta float64)

SetBeta calls the underlying SetBeta.

func (*ArrayMatrixMultiplication) Unwrap

Unwrap returns the underlying raw.MPSNDArrayMatrixMultiplication.

func (*ArrayMatrixMultiplication) WithAlpha

@property alpha @discussion 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.

WithAlpha sets the alpha property and returns the receiver for chaining.

func (*ArrayMatrixMultiplication) WithBeta

@property beta @discussion 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.

WithBeta sets the beta property and returns the receiver for chaining.

func (*ArrayMatrixMultiplication) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayMatrixMultiplication) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayMatrixMultiplication

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayMatrixMultiplicationProvider

type ArrayMatrixMultiplicationProvider interface {
	// contains filtered or unexported methods
}

ArrayMatrixMultiplicationProvider is implemented by ArrayMatrixMultiplication and any idiomatic type wrapping a MPSNDArrayMatrixMultiplication subclass.

type ArrayMatrixMultiplicationable

type ArrayMatrixMultiplicationable interface {
	Unwrap() *raw.MPSNDArrayMatrixMultiplication
	WithAlpha(alpha float64) *ArrayMatrixMultiplication
	WithBeta(beta float64) *ArrayMatrixMultiplication
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayMatrixMultiplication
	Alpha() float64
	SetAlpha(alpha float64)
	Beta() float64
	SetBeta(beta float64)
}

ArrayMatrixMultiplicationable is the interface implemented by ArrayMatrixMultiplication, for mocking and DI.

type ArrayMultiaryBase

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

ArrayMultiaryBase wraps raw.MPSNDArrayMultiaryBase with a fluent Go API.

func ArrayMultiaryBaseFromID

func ArrayMultiaryBaseFromID(id objc.ID) *ArrayMultiaryBase

ArrayMultiaryBaseFromID adopts an existing object pointer as a ArrayMultiaryBase (nil for 0).

func NewArrayMultiaryBaseWithCoderDevice

func NewArrayMultiaryBaseWithCoderDevice(coder *foundation.NSCoder, device metal.MTLDevice) *ArrayMultiaryBase

@abstract Initialize a MPSNDArrayMultiaryKernel from a NSCoder @param coder The NSCoder that contains the serialized object @param device The device on which the kernel will run @return A valid MPSNDArrayMultiaryKernel, or nil if allocation failure.

NewArrayMultiaryBaseWithCoderDevice creates a new ArrayMultiaryBase.

func NewArrayMultiaryBaseWithDeviceSourceCount

func NewArrayMultiaryBaseWithDeviceSourceCount(device metal.MTLDevice, count uint) *ArrayMultiaryBase

@abstract Initialize a MPSNDArrayMultiaryKernel @param device The device on which the kernel will run @param count The maximum number of NDArrays read by the kernel @return A valid MPSNDArrayMultiaryKernel, or nil if allocation failure.

NewArrayMultiaryBaseWithDeviceSourceCount creates a new ArrayMultiaryBase.

func (*ArrayMultiaryBase) DestinationArrayAllocator

func (x *ArrayMultiaryBase) DestinationArrayAllocator() mpscore.MPSNDArrayAllocator

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

DestinationArrayAllocator calls the underlying DestinationArrayAllocator.

func (*ArrayMultiaryBase) DestinationArrayDescriptorForSourceArraysSourceState

func (x *ArrayMultiaryBase) DestinationArrayDescriptorForSourceArraysSourceState(sources *foundation.NSArray[*mpscore.MPSNDArray], state *mpscore.MPSState) *mpscore.MPSNDArrayDescriptor

@abstract Return a descriptor suitable for allocating a NSArray to receive the result @discussion 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. @param sources The list of sources passed into the -encode call @param state The source state object, if any passed to the -encode call @return a valid MPSNDArrayDescriptor that may be used to create a MPSNDArray to used to hold the results of this kernel.

DestinationArrayDescriptorForSourceArraysSourceState calls the underlying DestinationArrayDescriptorForSourceArraysSourceState.

func (*ArrayMultiaryBase) DilationRatesForSourceIndex

func (x *ArrayMultiaryBase) DilationRatesForSourceIndex(sourceIndex uint) raw.MPSNDArraySizes

@abstract Get the kernel dilation rate for each dimension @param sourceIndex The index of the source image for which this applies @return The kernel dilation rate for each dimension.

DilationRatesForSourceIndex calls the underlying DilationRatesForSourceIndex.

func (*ArrayMultiaryBase) EdgeModeAtSourceIndex

func (x *ArrayMultiaryBase) EdgeModeAtSourceIndex(sourceIndex uint) mpscore.MPSImageEdgeMode

@abstract The edge mode used for each source NDArray @param sourceIndex The index of the source image @return The MPSImageEdgeMode for that image

EdgeModeAtSourceIndex calls the underlying EdgeModeAtSourceIndex.

func (*ArrayMultiaryBase) EncodeWithCoder

func (x *ArrayMultiaryBase) EncodeWithCoder(coder *foundation.NSCoder)

@abstract Initialize a MPSNDArrayMultiaryKernel from a NSCoder @param coder The NSCoder that contains the serialized object

EncodeWithCoder calls the underlying EncodeWithCoder.

func (*ArrayMultiaryBase) ID

func (x *ArrayMultiaryBase) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayMultiaryBase) KernelSizesForSourceIndex

func (x *ArrayMultiaryBase) KernelSizesForSourceIndex(sourceIndex uint) raw.MPSNDArraySizes

@abstract Get the diameters of the point spread function (PSF) in each dimension @param sourceIndex The MPSNDArrayMultiaryKernel source NDArray to which the kernel will be applied @return A list of kernel diameters in each dimension

KernelSizesForSourceIndex calls the underlying KernelSizesForSourceIndex.

func (*ArrayMultiaryBase) OffsetsAtSourceIndex

func (x *ArrayMultiaryBase) OffsetsAtSourceIndex(sourceIndex uint) raw.MPSNDArrayOffsets

@abstract Read offsets to use when addressing a source NDArray @discussion The coordinate of the position read from this source array which is used to calculate the result value at [0,0,0,....] If the position read is actually a contiguous region (e.g. the area covered by a convolution kernel) then this is the center of that region, rounded down, for each dimension. @param sourceIndex The index of the source MPSNDArray to which the list of offsets is applied

OffsetsAtSourceIndex calls the underlying OffsetsAtSourceIndex.

func (*ArrayMultiaryBase) ResultStateForSourceArraysSourceStatesDestinationArray

func (x *ArrayMultiaryBase) ResultStateForSourceArraysSourceStatesDestinationArray(sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], sourceStates *foundation.NSArray[*mpscore.MPSState], destinationArray *mpscore.MPSNDArray) *mpscore.MPSState

ResultStateForSourceArraysSourceStatesDestinationArray calls the underlying ResultStateForSourceArraysSourceStatesDestinationArray.

func (*ArrayMultiaryBase) SetDestinationArrayAllocator

func (x *ArrayMultiaryBase) SetDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator)

SetDestinationArrayAllocator calls the underlying SetDestinationArrayAllocator.

func (*ArrayMultiaryBase) StridesForSourceIndex

func (x *ArrayMultiaryBase) StridesForSourceIndex(sourceIndex uint) raw.MPSNDArrayOffsets

@abstract Return the downsampling ratio for the kernel in each dimension @discussion If the filter is a "backwards" filter such as a gradient filter or convolution transpose, then this is the upsampling ratio and zeros are inserted in the result. @param sourceIndex The index of the source for which the strides apply @return The strides from one destination sample to the next in each dimension of the corresponding source NDArray

StridesForSourceIndex calls the underlying StridesForSourceIndex.

func (*ArrayMultiaryBase) Unwrap

Unwrap returns the underlying raw.MPSNDArrayMultiaryBase.

func (*ArrayMultiaryBase) WithDestinationArrayAllocator

func (x *ArrayMultiaryBase) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayMultiaryBase

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayMultiaryBaseProvider

type ArrayMultiaryBaseProvider interface {
	// contains filtered or unexported methods
}

ArrayMultiaryBaseProvider is implemented by ArrayMultiaryBase and any idiomatic type wrapping a MPSNDArrayMultiaryBase subclass.

type ArrayMultiaryBaseable

type ArrayMultiaryBaseable interface {
	Unwrap() *raw.MPSNDArrayMultiaryBase
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayMultiaryBase
	OffsetsAtSourceIndex(sourceIndex uint) raw.MPSNDArrayOffsets
	EdgeModeAtSourceIndex(sourceIndex uint) mpscore.MPSImageEdgeMode
	KernelSizesForSourceIndex(sourceIndex uint) raw.MPSNDArraySizes
	StridesForSourceIndex(sourceIndex uint) raw.MPSNDArrayOffsets
	DilationRatesForSourceIndex(sourceIndex uint) raw.MPSNDArraySizes
	EncodeWithCoder(coder *foundation.NSCoder)
	ResultStateForSourceArraysSourceStatesDestinationArray(sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], sourceStates *foundation.NSArray[*mpscore.MPSState], destinationArray *mpscore.MPSNDArray) *mpscore.MPSState
	DestinationArrayDescriptorForSourceArraysSourceState(sources *foundation.NSArray[*mpscore.MPSNDArray], state *mpscore.MPSState) *mpscore.MPSNDArrayDescriptor
	DestinationArrayAllocator() mpscore.MPSNDArrayAllocator
	SetDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator)
}

ArrayMultiaryBaseable is the interface implemented by ArrayMultiaryBase, for mocking and DI.

type ArrayMultiaryGradientKernel

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

ArrayMultiaryGradientKernel wraps raw.MPSNDArrayMultiaryGradientKernel with a fluent Go API.

func ArrayMultiaryGradientKernelFromID

func ArrayMultiaryGradientKernelFromID(id objc.ID) *ArrayMultiaryGradientKernel

ArrayMultiaryGradientKernelFromID adopts an existing object pointer as a ArrayMultiaryGradientKernel (nil for 0).

func NewArrayMultiaryGradientKernelWithDeviceSourceCountSourceGradientIndex

func NewArrayMultiaryGradientKernelWithDeviceSourceCountSourceGradientIndex(device metal.MTLDevice, count uint, sourceGradientIndex uint) *ArrayMultiaryGradientKernel

@abstract Initialize a MPSNDArrayMultiaryKernel @param device The device on which the kernel will run @param count The maximum number of NDArrays read by the kernel @param sourceGradientIndex The source index for which gradient will be calculated @return A valid MPSNDArrayMultiaryKernel, or nil if allocation failure.

NewArrayMultiaryGradientKernelWithDeviceSourceCountSourceGradientIndex creates a new ArrayMultiaryGradientKernel.

func (*ArrayMultiaryGradientKernel) EncodeToCommandBufferSourceArraysSourceGradientGradientState

func (x *ArrayMultiaryGradientKernel) EncodeToCommandBufferSourceArraysSourceGradientGradientState(cmdBuf metal.MTLCommandBuffer, sources *foundation.NSArray[*mpscore.MPSNDArray], gradient *mpscore.MPSNDArray, state *mpscore.MPSState) *mpscore.MPSNDArray

EncodeToCommandBufferSourceArraysSourceGradientGradientState calls the underlying EncodeToCommandBufferSourceArraysSourceGradientGradientState.

func (*ArrayMultiaryGradientKernel) EncodeToCommandBufferSourceArraysSourceGradientGradientStateDestinationArray

func (x *ArrayMultiaryGradientKernel) EncodeToCommandBufferSourceArraysSourceGradientGradientStateDestinationArray(cmdBuf metal.MTLCommandBuffer, sources *foundation.NSArray[*mpscore.MPSNDArray], gradient *mpscore.MPSNDArray, state *mpscore.MPSState, destination *mpscore.MPSNDArray)

EncodeToCommandBufferSourceArraysSourceGradientGradientStateDestinationArray calls the underlying EncodeToCommandBufferSourceArraysSourceGradientGradientStateDestinationArray.

func (*ArrayMultiaryGradientKernel) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayMultiaryGradientKernel) Unwrap

Unwrap returns the underlying raw.MPSNDArrayMultiaryGradientKernel.

func (*ArrayMultiaryGradientKernel) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayMultiaryGradientKernel) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayMultiaryGradientKernel

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayMultiaryGradientKernelProvider

type ArrayMultiaryGradientKernelProvider interface {
	// contains filtered or unexported methods
}

ArrayMultiaryGradientKernelProvider is implemented by ArrayMultiaryGradientKernel and any idiomatic type wrapping a MPSNDArrayMultiaryGradientKernel subclass.

type ArrayMultiaryGradientKernelable

type ArrayMultiaryGradientKernelable interface {
	Unwrap() *raw.MPSNDArrayMultiaryGradientKernel
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayMultiaryGradientKernel
	EncodeToCommandBufferSourceArraysSourceGradientGradientState(cmdBuf metal.MTLCommandBuffer, sources *foundation.NSArray[*mpscore.MPSNDArray], gradient *mpscore.MPSNDArray, state *mpscore.MPSState) *mpscore.MPSNDArray
	EncodeToCommandBufferSourceArraysSourceGradientGradientStateDestinationArray(cmdBuf metal.MTLCommandBuffer, sources *foundation.NSArray[*mpscore.MPSNDArray], gradient *mpscore.MPSNDArray, state *mpscore.MPSState, destination *mpscore.MPSNDArray)
}

ArrayMultiaryGradientKernelable is the interface implemented by ArrayMultiaryGradientKernel, for mocking and DI.

type ArrayMultiaryKernel

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

ArrayMultiaryKernel wraps raw.MPSNDArrayMultiaryKernel with a fluent Go API.

func ArrayMultiaryKernelFromID

func ArrayMultiaryKernelFromID(id objc.ID) *ArrayMultiaryKernel

ArrayMultiaryKernelFromID adopts an existing object pointer as a ArrayMultiaryKernel (nil for 0).

func NewArrayMultiaryKernelWithCoderDevice

func NewArrayMultiaryKernelWithCoderDevice(coder *foundation.NSCoder, device metal.MTLDevice) *ArrayMultiaryKernel

NewArrayMultiaryKernelWithCoderDevice creates a new ArrayMultiaryKernel.

func NewArrayMultiaryKernelWithDeviceSourceCount

func NewArrayMultiaryKernelWithDeviceSourceCount(device metal.MTLDevice, count uint) *ArrayMultiaryKernel

NewArrayMultiaryKernelWithDeviceSourceCount creates a new ArrayMultiaryKernel.

func (*ArrayMultiaryKernel) EncodeToCommandBufferSourceArrays

func (x *ArrayMultiaryKernel) EncodeToCommandBufferSourceArrays(cmdBuf metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray]) *mpscore.MPSNDArray

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param sourceArrays The list of sources for the filter in a NSArray. Ordering to be defined by subclass @result A newly allocated MPSNDArray that will contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandBufferSourceArrays calls the underlying EncodeToCommandBufferSourceArrays.

func (*ArrayMultiaryKernel) EncodeToCommandBufferSourceArraysDestinationArray

func (x *ArrayMultiaryKernel) EncodeToCommandBufferSourceArraysDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], destination *mpscore.MPSNDArray)

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param sourceArrays The list of sources for the filter in a NSArray. Ordering to be defined by subclass @param destination The NDArray to receive the result

EncodeToCommandBufferSourceArraysDestinationArray calls the underlying EncodeToCommandBufferSourceArraysDestinationArray.

func (*ArrayMultiaryKernel) EncodeToCommandBufferSourceArraysResultStateDestinationArray

func (x *ArrayMultiaryKernel) EncodeToCommandBufferSourceArraysResultStateDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], outGradientState *mpscore.MPSState, destination *mpscore.MPSNDArray)

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param sourceArrays The list of sources for the filter in a NSArray. Ordering to be defined by subclass @param outGradientState The output gradient state to record the operation for later use by gradient @param destination A destination array to contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandBufferSourceArraysResultStateDestinationArray calls the underlying EncodeToCommandBufferSourceArraysResultStateDestinationArray.

func (*ArrayMultiaryKernel) EncodeToCommandBufferSourceArraysResultStateOutputStateIsTemporary

func (x *ArrayMultiaryKernel) EncodeToCommandBufferSourceArraysResultStateOutputStateIsTemporary(cmdBuf metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], outGradientState *mpscore.MPSState, outputStateIsTemporary bool) *mpscore.MPSNDArray

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param sourceArrays The list of sources for the filter in a NSArray. Ordering to be defined by subclass @param outGradientState If non-nil, the address output gradient state is written to this address @param outputStateIsTemporary If YES, the state if any will be allocated to contain temporary textures and buffers as needed @result A newly allocated MPSNDArray that will contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandBufferSourceArraysResultStateOutputStateIsTemporary calls the underlying EncodeToCommandBufferSourceArraysResultStateOutputStateIsTemporary.

func (*ArrayMultiaryKernel) EncodeToCommandEncoderCommandBufferSourceArraysDestinationArray

func (x *ArrayMultiaryKernel) EncodeToCommandEncoderCommandBufferSourceArraysDestinationArray(encoder metal.MTLComputeCommandEncoder, commandBuffer metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], destination *mpscore.MPSNDArray)

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param encoder The MTLComputeCommandEncoder that the kernel will be encoded on @param commandBuffer The command buffer into which to encode the kernel @param sourceArrays The list of sources for the filter in a NSArray. Ordering to be defined by subclass @param destination A destination array to contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandEncoderCommandBufferSourceArraysDestinationArray calls the underlying EncodeToCommandEncoderCommandBufferSourceArraysDestinationArray.

func (*ArrayMultiaryKernel) ID

func (x *ArrayMultiaryKernel) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayMultiaryKernel) Unwrap

Unwrap returns the underlying raw.MPSNDArrayMultiaryKernel.

func (*ArrayMultiaryKernel) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayMultiaryKernel) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayMultiaryKernel

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayMultiaryKernelProvider

type ArrayMultiaryKernelProvider interface {
	// contains filtered or unexported methods
}

ArrayMultiaryKernelProvider is implemented by ArrayMultiaryKernel and any idiomatic type wrapping a MPSNDArrayMultiaryKernel subclass.

type ArrayMultiaryKernelable

type ArrayMultiaryKernelable interface {
	Unwrap() *raw.MPSNDArrayMultiaryKernel
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayMultiaryKernel
	EncodeToCommandBufferSourceArrays(cmdBuf metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray]) *mpscore.MPSNDArray
	EncodeToCommandBufferSourceArraysDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], destination *mpscore.MPSNDArray)
	EncodeToCommandBufferSourceArraysResultStateOutputStateIsTemporary(cmdBuf metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], outGradientState *mpscore.MPSState, outputStateIsTemporary bool) *mpscore.MPSNDArray
	EncodeToCommandBufferSourceArraysResultStateDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], outGradientState *mpscore.MPSState, destination *mpscore.MPSNDArray)
	EncodeToCommandEncoderCommandBufferSourceArraysDestinationArray(encoder metal.MTLComputeCommandEncoder, commandBuffer metal.MTLCommandBuffer, sourceArrays *foundation.NSArray[*mpscore.MPSNDArray], destination *mpscore.MPSNDArray)
}

ArrayMultiaryKernelable is the interface implemented by ArrayMultiaryKernel, for mocking and DI.

type ArrayQuantizationDescriptor

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

ArrayQuantizationDescriptor wraps raw.MPSNDArrayQuantizationDescriptor with a fluent Go API.

func ArrayQuantizationDescriptorFromID

func ArrayQuantizationDescriptorFromID(id objc.ID) *ArrayQuantizationDescriptor

ArrayQuantizationDescriptorFromID adopts an existing object pointer as a ArrayQuantizationDescriptor (nil for 0).

func NewArrayQuantizationDescriptor

func NewArrayQuantizationDescriptor() *ArrayQuantizationDescriptor

NewArrayQuantizationDescriptor creates a new ArrayQuantizationDescriptor.

func (*ArrayQuantizationDescriptor) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayQuantizationDescriptor) QuantizationDataType

func (x *ArrayQuantizationDescriptor) QuantizationDataType() mpscore.MPSDataType

@property quantizationDataType @abstract The datatype to use with quantization - the default is MPSDataTypeUint8

QuantizationDataType calls the underlying QuantizationDataType.

func (*ArrayQuantizationDescriptor) QuantizationScheme

@property quantizationScheme @abstract The quantization scheme for this descriptor. The default is MPSNDArrayQuantizationTypeNone.

QuantizationScheme calls the underlying QuantizationScheme.

func (*ArrayQuantizationDescriptor) Unwrap

Unwrap returns the underlying raw.MPSNDArrayQuantizationDescriptor.

type ArrayQuantizationDescriptorProvider

type ArrayQuantizationDescriptorProvider interface {
	// contains filtered or unexported methods
}

ArrayQuantizationDescriptorProvider is implemented by ArrayQuantizationDescriptor and any idiomatic type wrapping a MPSNDArrayQuantizationDescriptor subclass.

type ArrayQuantizationDescriptorable

type ArrayQuantizationDescriptorable interface {
	Unwrap() *raw.MPSNDArrayQuantizationDescriptor
	QuantizationDataType() mpscore.MPSDataType
	QuantizationScheme() MPSNDArrayQuantizationScheme
}

ArrayQuantizationDescriptorable is the interface implemented by ArrayQuantizationDescriptor, for mocking and DI.

type ArrayQuantizedMatrixMultiplication

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

ArrayQuantizedMatrixMultiplication wraps raw.MPSNDArrayQuantizedMatrixMultiplication with a fluent Go API.

func ArrayQuantizedMatrixMultiplicationFromID

func ArrayQuantizedMatrixMultiplicationFromID(id objc.ID) *ArrayQuantizedMatrixMultiplication

ArrayQuantizedMatrixMultiplicationFromID adopts an existing object pointer as a ArrayQuantizedMatrixMultiplication (nil for 0).

func NewArrayQuantizedMatrixMultiplicationWithDeviceLeftQuantizationDescriptorRightQuantizationDescriptor

func NewArrayQuantizedMatrixMultiplicationWithDeviceLeftQuantizationDescriptorRightQuantizationDescriptor(device metal.MTLDevice, leftQuantizationDescriptor *raw.MPSNDArrayQuantizationDescriptor, rightQuantizationDescriptor *raw.MPSNDArrayQuantizationDescriptor) *ArrayQuantizedMatrixMultiplication

@abstract Initializes a quantized matrix multiplication kernel. @param leftQuantizationDescriptor The quantization definition for the LHS input. @param rightQuantizationDescriptor The quantization definition for the RHS input. @result A new valid quantized matrix multiplication kernel.

NewArrayQuantizedMatrixMultiplicationWithDeviceLeftQuantizationDescriptorRightQuantizationDescriptor creates a new ArrayQuantizedMatrixMultiplication.

func (*ArrayQuantizedMatrixMultiplication) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayQuantizedMatrixMultiplication) Unwrap

Unwrap returns the underlying raw.MPSNDArrayQuantizedMatrixMultiplication.

func (*ArrayQuantizedMatrixMultiplication) WithAlpha added in v0.3.1

@property alpha @discussion 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.

WithAlpha sets the alpha property and returns the receiver for chaining.

func (*ArrayQuantizedMatrixMultiplication) WithBeta added in v0.3.1

@property beta @discussion 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.

WithBeta sets the beta property and returns the receiver for chaining.

func (*ArrayQuantizedMatrixMultiplication) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayQuantizedMatrixMultiplication) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayQuantizedMatrixMultiplication

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayQuantizedMatrixMultiplicationable

type ArrayQuantizedMatrixMultiplicationable interface {
	Unwrap() *raw.MPSNDArrayQuantizedMatrixMultiplication
	WithAlpha(alpha float64) *ArrayQuantizedMatrixMultiplication
	WithBeta(beta float64) *ArrayQuantizedMatrixMultiplication
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayQuantizedMatrixMultiplication
}

ArrayQuantizedMatrixMultiplicationable is the interface implemented by ArrayQuantizedMatrixMultiplication, for mocking and DI.

type ArrayStridedSlice

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

ArrayStridedSlice wraps raw.MPSNDArrayStridedSlice with a fluent Go API.

func ArrayStridedSliceFromID

func ArrayStridedSliceFromID(id objc.ID) *ArrayStridedSlice

ArrayStridedSliceFromID adopts an existing object pointer as a ArrayStridedSlice (nil for 0).

func NewArrayStridedSlice

func NewArrayStridedSlice() *ArrayStridedSlice

NewArrayStridedSlice creates a new ArrayStridedSlice.

func (*ArrayStridedSlice) ID

func (x *ArrayStridedSlice) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayStridedSlice) SetStrides

func (x *ArrayStridedSlice) SetStrides(strides raw.MPSNDArrayOffsets)

SetStrides calls the underlying SetStrides.

func (*ArrayStridedSlice) Unwrap

Unwrap returns the underlying raw.MPSNDArrayStridedSlice.

func (*ArrayStridedSlice) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayStridedSlice) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayStridedSlice

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

func (*ArrayStridedSlice) WithStrides

func (x *ArrayStridedSlice) WithStrides(strides raw.MPSNDArrayOffsets) *ArrayStridedSlice

@property strides @abstract The strides to use when slicing the input array.

WithStrides sets the strides property and returns the receiver for chaining.

type ArrayStridedSliceGradient

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

ArrayStridedSliceGradient wraps raw.MPSNDArrayStridedSliceGradient with a fluent Go API.

func ArrayStridedSliceGradientFromID

func ArrayStridedSliceGradientFromID(id objc.ID) *ArrayStridedSliceGradient

ArrayStridedSliceGradientFromID adopts an existing object pointer as a ArrayStridedSliceGradient (nil for 0).

func NewArrayStridedSliceGradient

func NewArrayStridedSliceGradient() *ArrayStridedSliceGradient

NewArrayStridedSliceGradient creates a new ArrayStridedSliceGradient.

func (*ArrayStridedSliceGradient) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayStridedSliceGradient) Unwrap

Unwrap returns the underlying raw.MPSNDArrayStridedSliceGradient.

func (*ArrayStridedSliceGradient) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayStridedSliceGradient) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayStridedSliceGradient

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayStridedSliceGradientable

type ArrayStridedSliceGradientable interface {
	Unwrap() *raw.MPSNDArrayStridedSliceGradient
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayStridedSliceGradient
}

ArrayStridedSliceGradientable is the interface implemented by ArrayStridedSliceGradient, for mocking and DI.

type ArrayStridedSliceable

type ArrayStridedSliceable interface {
	Unwrap() *raw.MPSNDArrayStridedSlice
	WithStrides(strides raw.MPSNDArrayOffsets) *ArrayStridedSlice
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayStridedSlice
	SetStrides(strides raw.MPSNDArrayOffsets)
}

ArrayStridedSliceable is the interface implemented by ArrayStridedSlice, for mocking and DI.

type ArrayUnaryGradientKernel

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

ArrayUnaryGradientKernel wraps raw.MPSNDArrayUnaryGradientKernel with a fluent Go API.

func ArrayUnaryGradientKernelFromID

func ArrayUnaryGradientKernelFromID(id objc.ID) *ArrayUnaryGradientKernel

ArrayUnaryGradientKernelFromID adopts an existing object pointer as a ArrayUnaryGradientKernel (nil for 0).

func NewArrayUnaryGradientKernelWithDevice

func NewArrayUnaryGradientKernelWithDevice(device metal.MTLDevice) *ArrayUnaryGradientKernel

NewArrayUnaryGradientKernelWithDevice creates a new ArrayUnaryGradientKernel.

func (*ArrayUnaryGradientKernel) EncodeToCommandBufferSourceArraySourceGradientGradientState

func (x *ArrayUnaryGradientKernel) EncodeToCommandBufferSourceArraySourceGradientGradientState(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState) *mpscore.MPSNDArray

EncodeToCommandBufferSourceArraySourceGradientGradientState calls the underlying EncodeToCommandBufferSourceArraySourceGradientGradientState.

func (*ArrayUnaryGradientKernel) EncodeToCommandBufferSourceArraySourceGradientGradientStateDestinationArray

func (x *ArrayUnaryGradientKernel) EncodeToCommandBufferSourceArraySourceGradientGradientStateDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState, destination *mpscore.MPSNDArray)

EncodeToCommandBufferSourceArraySourceGradientGradientStateDestinationArray calls the underlying EncodeToCommandBufferSourceArraySourceGradientGradientStateDestinationArray.

func (*ArrayUnaryGradientKernel) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayUnaryGradientKernel) Unwrap

Unwrap returns the underlying raw.MPSNDArrayUnaryGradientKernel.

func (*ArrayUnaryGradientKernel) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayUnaryGradientKernel) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayUnaryGradientKernel

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayUnaryGradientKernelProvider

type ArrayUnaryGradientKernelProvider interface {
	// contains filtered or unexported methods
}

ArrayUnaryGradientKernelProvider is implemented by ArrayUnaryGradientKernel and any idiomatic type wrapping a MPSNDArrayUnaryGradientKernel subclass.

type ArrayUnaryGradientKernelable

type ArrayUnaryGradientKernelable interface {
	Unwrap() *raw.MPSNDArrayUnaryGradientKernel
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayUnaryGradientKernel
	EncodeToCommandBufferSourceArraySourceGradientGradientState(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState) *mpscore.MPSNDArray
	EncodeToCommandBufferSourceArraySourceGradientGradientStateDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, gradient *mpscore.MPSNDArray, state *mpscore.MPSState, destination *mpscore.MPSNDArray)
}

ArrayUnaryGradientKernelable is the interface implemented by ArrayUnaryGradientKernel, for mocking and DI.

type ArrayUnaryKernel

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

ArrayUnaryKernel wraps raw.MPSNDArrayUnaryKernel with a fluent Go API.

func ArrayUnaryKernelFromID

func ArrayUnaryKernelFromID(id objc.ID) *ArrayUnaryKernel

ArrayUnaryKernelFromID adopts an existing object pointer as a ArrayUnaryKernel (nil for 0).

func NewArrayUnaryKernelWithDevice

func NewArrayUnaryKernelWithDevice(device metal.MTLDevice) *ArrayUnaryKernel

NewArrayUnaryKernelWithDevice creates a new ArrayUnaryKernel.

func (*ArrayUnaryKernel) DilationRates

func (x *ArrayUnaryKernel) DilationRates() raw.MPSNDArraySizes

@property dilationRate @abstract The stride in each dimension from one PSF tap to an adjacent PSF tap. Default: 1

DilationRates calls the underlying DilationRates.

func (*ArrayUnaryKernel) EdgeMode

@property edgeMode @abstract The edge mode used for a source NDArray Default: MPSImageEdgeModeZero

EdgeMode calls the underlying EdgeMode.

func (*ArrayUnaryKernel) EncodeToCommandBufferSourceArray

func (x *ArrayUnaryKernel) EncodeToCommandBufferSourceArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray) *mpscore.MPSNDArray

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param sourceArray The source for the filter in an NSArray. @result A newly allocated MPSNDArray that will contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandBufferSourceArray calls the underlying EncodeToCommandBufferSourceArray.

func (*ArrayUnaryKernel) EncodeToCommandBufferSourceArrayDestinationArray

func (x *ArrayUnaryKernel) EncodeToCommandBufferSourceArrayDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, destination *mpscore.MPSNDArray)

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param sourceArray The source for the filter in an NSArray. @param destination The NDArray to receive the result

EncodeToCommandBufferSourceArrayDestinationArray calls the underlying EncodeToCommandBufferSourceArrayDestinationArray.

func (*ArrayUnaryKernel) EncodeToCommandBufferSourceArrayResultStateDestinationArray

func (x *ArrayUnaryKernel) EncodeToCommandBufferSourceArrayResultStateDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, outGradientState *mpscore.MPSState, destination *mpscore.MPSNDArray)

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param sourceArray The source for the filter in an NSArray. @param outGradientState The output gradient state to record the operation for later use by gradient @param destination A destination array to contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandBufferSourceArrayResultStateDestinationArray calls the underlying EncodeToCommandBufferSourceArrayResultStateDestinationArray.

func (*ArrayUnaryKernel) EncodeToCommandBufferSourceArrayResultStateOutputStateIsTemporary

func (x *ArrayUnaryKernel) EncodeToCommandBufferSourceArrayResultStateOutputStateIsTemporary(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, outGradientState *mpscore.MPSState, outputStateIsTemporary bool) *mpscore.MPSNDArray

@abstract Encode a simple inference NDArray kernel and return a NDArray to hold the result @param cmdBuf The command buffer into which to encode the kernel @param sourceArray The source for the filter in an NSArray. @param outGradientState If non-nil, the address output gradient state is written to this address @param outputStateIsTemporary If YES, the state if any will be allocated to contain temporary textures and buffers as needed @result A newly allocated MPSNDArray that will contain the result of the calculation when the command buffer completes successfully.

EncodeToCommandBufferSourceArrayResultStateOutputStateIsTemporary calls the underlying EncodeToCommandBufferSourceArrayResultStateOutputStateIsTemporary.

func (*ArrayUnaryKernel) ID

func (x *ArrayUnaryKernel) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayUnaryKernel) KernelSizes

func (x *ArrayUnaryKernel) KernelSizes() raw.MPSNDArraySizes

@property kernelSizes @abstract The diameters of the point spread function in each dimension for a source NDArray Default: 1

KernelSizes calls the underlying KernelSizes.

func (*ArrayUnaryKernel) Offsets

func (x *ArrayUnaryKernel) Offsets() raw.MPSNDArrayOffsets

@property offsets @abstract The coordinate of the position read from this source array which is used to calculate the result value at [0,0,0,....] If the position read is actually a contiguous region (e.g. the area covered by a convolution kernel) then this is the center of that region, rounded down, for each dimension. Default: 0,0,0...

Offsets calls the underlying Offsets.

func (*ArrayUnaryKernel) Strides

func (x *ArrayUnaryKernel) Strides() raw.MPSNDArrayOffsets

@property kernelStrides @abstract If the filter is a "backwards" filter such as a gradient filter or convolution transpose, then this is the upsampling ratio and zeros are inserted in the result. Default: 1

Strides calls the underlying Strides.

func (*ArrayUnaryKernel) Unwrap

Unwrap returns the underlying raw.MPSNDArrayUnaryKernel.

func (*ArrayUnaryKernel) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayUnaryKernel) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayUnaryKernel

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

type ArrayUnaryKernelProvider

type ArrayUnaryKernelProvider interface {
	// contains filtered or unexported methods
}

ArrayUnaryKernelProvider is implemented by ArrayUnaryKernel and any idiomatic type wrapping a MPSNDArrayUnaryKernel subclass.

type ArrayUnaryKernelable

type ArrayUnaryKernelable interface {
	Unwrap() *raw.MPSNDArrayUnaryKernel
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayUnaryKernel
	EncodeToCommandBufferSourceArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray) *mpscore.MPSNDArray
	EncodeToCommandBufferSourceArrayDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, destination *mpscore.MPSNDArray)
	EncodeToCommandBufferSourceArrayResultStateOutputStateIsTemporary(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, outGradientState *mpscore.MPSState, outputStateIsTemporary bool) *mpscore.MPSNDArray
	EncodeToCommandBufferSourceArrayResultStateDestinationArray(cmdBuf metal.MTLCommandBuffer, sourceArray *mpscore.MPSNDArray, outGradientState *mpscore.MPSState, destination *mpscore.MPSNDArray)
	Offsets() raw.MPSNDArrayOffsets
	EdgeMode() mpscore.MPSImageEdgeMode
	KernelSizes() raw.MPSNDArraySizes
	Strides() raw.MPSNDArrayOffsets
	DilationRates() raw.MPSNDArraySizes
}

ArrayUnaryKernelable is the interface implemented by ArrayUnaryKernel, for mocking and DI.

type ArrayVectorLUTDequantize

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

ArrayVectorLUTDequantize wraps raw.MPSNDArrayVectorLUTDequantize with a fluent Go API.

func ArrayVectorLUTDequantizeFromID

func ArrayVectorLUTDequantizeFromID(id objc.ID) *ArrayVectorLUTDequantize

ArrayVectorLUTDequantizeFromID adopts an existing object pointer as a ArrayVectorLUTDequantize (nil for 0).

func NewArrayVectorLUTDequantizeWithDeviceAxis

func NewArrayVectorLUTDequantizeWithDeviceAxis(device metal.MTLDevice, axis uint) *ArrayVectorLUTDequantize

@abstract Initializes a kernel for vector-based LUT dequantization. @param device The Metal device to be used with this kernel. @param axis The vector axis in the output. @result A new vector LUT dequantization kernel.

NewArrayVectorLUTDequantizeWithDeviceAxis creates a new ArrayVectorLUTDequantize.

func (*ArrayVectorLUTDequantize) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ArrayVectorLUTDequantize) SetVectorAxis

func (x *ArrayVectorLUTDequantize) SetVectorAxis(vectorAxis uint)

SetVectorAxis calls the underlying SetVectorAxis.

func (*ArrayVectorLUTDequantize) Unwrap

Unwrap returns the underlying raw.MPSNDArrayVectorLUTDequantize.

func (*ArrayVectorLUTDequantize) VectorAxis

func (x *ArrayVectorLUTDequantize) VectorAxis() uint

@property vectorAxis @abstract Which axis in the destination will receive the vector component, must be less than 4.

VectorAxis calls the underlying VectorAxis.

func (*ArrayVectorLUTDequantize) WithDestinationArrayAllocator added in v0.3.1

func (x *ArrayVectorLUTDequantize) WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayVectorLUTDequantize

@abstract Method to allocate the result image for -encodeToCommandBuffer:sourceImage: @discussion Default: MPSTemporaryImage.defaultAllocator

WithDestinationArrayAllocator sets the destinationArrayAllocator property and returns the receiver for chaining.

func (*ArrayVectorLUTDequantize) WithVectorAxis

func (x *ArrayVectorLUTDequantize) WithVectorAxis(vectorAxis uint) *ArrayVectorLUTDequantize

@property vectorAxis @abstract Which axis in the destination will receive the vector component, must be less than 4.

WithVectorAxis sets the vectorAxis property and returns the receiver for chaining.

type ArrayVectorLUTDequantizeable

type ArrayVectorLUTDequantizeable interface {
	Unwrap() *raw.MPSNDArrayVectorLUTDequantize
	WithVectorAxis(vectorAxis uint) *ArrayVectorLUTDequantize
	WithDestinationArrayAllocator(destinationArrayAllocator mpscore.MPSNDArrayAllocator) *ArrayVectorLUTDequantize
	VectorAxis() uint
	SetVectorAxis(vectorAxis uint)
}

ArrayVectorLUTDequantizeable is the interface implemented by ArrayVectorLUTDequantize, for mocking and DI.

type MPSNDArrayQuantizationScheme added in v0.5.0

type MPSNDArrayQuantizationScheme uint64

Bitmask — values may be combined with |.

const (
	MPSNDArrayQuantizationTypeNone   MPSNDArrayQuantizationScheme = 0
	MPSNDArrayQuantizationTypeAffine MPSNDArrayQuantizationScheme = 1
	MPSNDArrayQuantizationTypeLUT    MPSNDArrayQuantizationScheme = 2
)

func (MPSNDArrayQuantizationScheme) String added in v0.5.0

Jump to

Keyboard shortcuts

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