mpsimage

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package mpsimage provides purego-based Go bindings for the macOS MPSImage framework.

Apple documentation: https://developer.apple.com/documentation/mpsimage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MPSImageMedianMaxKernelDiameter

func MPSImageMedianMaxKernelDiameter() uint

@abstract The maximum diameter in pixels of the filter window supported by the median filter.

func MPSImageMedianMinKernelDiameter

func MPSImageMedianMinKernelDiameter() uint

@abstract The minimum diameter in pixels of the filter window supported by the median filter.

Types

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Launch_data_type_t

type Launch_data_type_t int64
const (
	LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1
	LAUNCH_DATA_ARRAY      Launch_data_type_t = 2
	LAUNCH_DATA_FD         Launch_data_type_t = 3
	LAUNCH_DATA_INTEGER    Launch_data_type_t = 4
	LAUNCH_DATA_REAL       Launch_data_type_t = 5
	LAUNCH_DATA_BOOL       Launch_data_type_t = 6
	LAUNCH_DATA_STRING     Launch_data_type_t = 7
	LAUNCH_DATA_OPAQUE     Launch_data_type_t = 8
	LAUNCH_DATA_ERRNO      Launch_data_type_t = 9
	LAUNCH_DATA_MACHPORT   Launch_data_type_t = 10
)

func (Launch_data_type_t) String

func (e Launch_data_type_t) String() string

type MDLabelDomain

type MDLabelDomain int64

@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

type MDQueryOptionFlags

type MDQueryOptionFlags int64
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int64

@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.

const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

type MPSAlphaType

type MPSAlphaType uint64
const (
	MPSAlphaTypeNonPremultiplied MPSAlphaType = 0
	MPSAlphaTypeAlphaIsOne       MPSAlphaType = 1
	MPSAlphaTypePremultiplied    MPSAlphaType = 2
)

func (MPSAlphaType) String

func (e MPSAlphaType) String() string

type MPSBinaryImageKernel

type MPSBinaryImageKernel struct {
	mpscore.MPSKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsbinaryimagekernel

func MPSBinaryImageKernelFromID

func MPSBinaryImageKernelFromID(id objc.ID) *MPSBinaryImageKernel

func (*MPSBinaryImageKernel) ClipRect

func (o *MPSBinaryImageKernel) ClipRect() metal.MTLRegion

@property clipRect @abstract An optional clip rectangle to use when writing data. Only the pixels in the rectangle will be overwritten. @discussion A MTLRegion that indicates which part of the destination to overwrite. If the clipRect does not lie completely within the destination image, the intersection between clip rectangle and destination bounds is used. Default: MPSRectNoClip (MPSKernel::MPSRectNoClip) indicating the entire image. See Also: @ref MetalPerformanceShaders.h subsubsection_clipRect

func (*MPSBinaryImageKernel) EncodeToCommandBufferInPlacePrimaryTextureSecondaryTextureFallbackCopyAllocator

func (o *MPSBinaryImageKernel) EncodeToCommandBufferInPlacePrimaryTextureSecondaryTextureFallbackCopyAllocator(commandBuffer metal.MTLCommandBuffer, inPlacePrimaryTexture metal.MTLTexture, secondaryTexture metal.MTLTexture, copyAllocator func() unsafe.Pointer) bool

@abstract Attempt to apply a MPSKernel to a texture in place. @discussion This method attempts to apply the MPSKernel in place on a texture. @code In-place operation means that the same texture is used both to hold the input image and the results. Operating in-place can be an excellent way to reduce resource utilization, and save time and energy. While simple Metal kernels can not operate in place because textures can not be readable and writable at the same time, some MPSKernels can operate in place because they use multi-pass algorithms. Whether a MPSKernel can operate in-place can depend on current hardware, operating system revision and the parameters and properties passed to it. You should never assume that a MPSKernel will continue to work in place, even if you have observed it doing so before. @endcode If the operation succeeds in-place, YES is returned. If the in-place operation fails and no copyAllocator is provided, then NO is returned. In neither case is the pointer held at *texture modified. Failure during in-place operation is common. You may find it simplifies your code to provide a copyAllocator. When an in-place filter fails, your copyAllocator will be invoked to create a new texture in which to write the results, allowing the filter to proceed reliably out-of-place. The original texture will be released, replaced with a pointer to the new texture and YES will be returned. If the allocator returns an invalid texture, it is released, *texture remains unmodified and NO is returned. Please see the MPSCopyAllocator definition for a sample allocator implementation. Note: Image filters that look at neighboring pixel values may actually consume more memory when operating in place than out of place. Many such operations are tiled internally to save intermediate texture storage, but can not tile when operating in place. The memory savings for tiling is however very short term, typically the lifetime of the MTLCommandBuffer. @param commandBuffer A valid MTLCommandBuffer to receive the encoded filter @param inPlacePrimaryTexture A pointer to a valid MTLTexture containing secondary image. On success, the image contents and possibly texture itself will be replaced with the result image. @param secondaryTexture A pointer to a valid MTLTexture containing the primary source image. It will not be overwritten. @param copyAllocator An optional block to allocate a new texture to hold the results, in case in-place operation is not possible. The allocator may use a different MTLPixelFormat or size than the original texture. You may enqueue operations on the provided MTLCommandBuffer using the provided MTLComputeCommandEncoder to initialize the texture contents. @return On success, YES is returned. The texture may have been replaced with a new texture if a copyAllocator was provided. On failure, NO is returned. The texture is unmodified.

func (*MPSBinaryImageKernel) EncodeToCommandBufferPrimaryImageSecondaryImageDestinationImage

func (o *MPSBinaryImageKernel) EncodeToCommandBufferPrimaryImageSecondaryImageDestinationImage(commandBuffer metal.MTLCommandBuffer, primaryImage *mpscore.MPSImage, secondaryImage *mpscore.MPSImage, destinationImage *mpscore.MPSImage)

@abstract Encode a MPSKernel into a command Buffer. The operation shall proceed out-of-place. @param commandBuffer A valid MTLCommandBuffer to receive the encoded filter @param primaryImage A valid MPSImage containing the primary source image. @param secondaryImage A valid MPSImage containing the secondary source image. @param destinationImage A valid MPSImage to be overwritten by result image. destinationImage may not alias the source images.

func (*MPSBinaryImageKernel) EncodeToCommandBufferPrimaryTextureInPlaceSecondaryTextureFallbackCopyAllocator

func (o *MPSBinaryImageKernel) EncodeToCommandBufferPrimaryTextureInPlaceSecondaryTextureFallbackCopyAllocator(commandBuffer metal.MTLCommandBuffer, primaryTexture metal.MTLTexture, inPlaceSecondaryTexture metal.MTLTexture, copyAllocator func() unsafe.Pointer) bool

This method attempts to apply the MPSKernel in place on a texture. In-place operation means that the same texture is used both to hold the input image and the results. Operating in-place can be an excellent way to reduce resource utilization, and save time and energy. While simple Metal kernels can not operate in place because textures can not be readable and writable at the same time, some MPSKernels can operate in place because they use multi-pass algorithms. Whether a MPSKernel can operate in-place can depend on current hardware, operating system revision and the parameters and properties passed to it. You should never assume that a MPSKernel will continue to work in place, even if you have observed it doing so before. If the operation succeeds in-place, YES is returned. If the in-place operation fails and no copyAllocator is provided, then NO is returned. In neither case is the pointer held at *texture modified. Failure during in-place operation is common. You may find it simplifies your code to provide a copyAllocator. When an in-place filter fails, your copyAllocator will be invoked to create a new texture in which to write the results, allowing the filter to proceed reliably out-of-place. The original texture will be released, replaced with a pointer to the new texture and YES will be returned. If the allocator returns an invalid texture, it is released, *texture remains unmodified and NO is returned. Please see the MPSCopyAllocator definition for a sample allocator implementation. Note: Image filters that look at neighboring pixel values may actually consume more memory when operating in place than out of place. Many such operations are tiled internally to save intermediate texture storage, but can not tile when operating in place. The memory savings for tiling is however very short term, typically the lifetime of the MTLCommandBuffer. @abstract Attempt to apply a MPSKernel to a texture in place. @param commandBuffer A valid MTLCommandBuffer to receive the encoded filter @param primaryTexture A pointer to a valid MTLTexture containing the primary source image. It will not be overwritten. @param inPlaceSecondaryTexture A pointer to a valid MTLTexture containing secondary image. On success, the image contents and possibly texture itself will be replaced with the result image. @param copyAllocator An optional block to allocate a new texture to hold the results, in case in-place operation is not possible. The allocator may use a different MTLPixelFormat or size than the original texture. You may enqueue operations on the provided MTLCommandBuffer using the provided MTLComputeCommandEncoder to initialize the texture contents. @return On success, YES is returned. The texture may have been replaced with a new texture if a copyAllocator was provided. On failure, NO is returned. The texture is unmodified.

func (*MPSBinaryImageKernel) EncodeToCommandBufferPrimaryTextureSecondaryTextureDestinationTexture

func (o *MPSBinaryImageKernel) EncodeToCommandBufferPrimaryTextureSecondaryTextureDestinationTexture(commandBuffer metal.MTLCommandBuffer, primaryTexture metal.MTLTexture, secondaryTexture metal.MTLTexture, destinationTexture metal.MTLTexture)

@abstract Encode a MPSKernel into a command Buffer. The operation shall proceed out-of-place. @param commandBuffer A valid MTLCommandBuffer to receive the encoded filter @param primaryTexture A valid MTLTexture containing the primary source image. @param secondaryTexture A valid MTLTexture containing the secondary source image. @param destinationTexture A valid MTLTexture to be overwritten by result image. destinationTexture may not alias the source textures.

func (*MPSBinaryImageKernel) InitWithCoderDevice

func (o *MPSBinaryImageKernel) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSBinaryImageKernel

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSBinaryImageKernel) InitWithDevice

func (o *MPSBinaryImageKernel) InitWithDevice(device metal.MTLDevice) *MPSBinaryImageKernel

@abstract Standard init with default properties per filter type @param device The device that the filter will be used on. May not be NULL. @result a pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later.

func (*MPSBinaryImageKernel) PrimaryEdgeMode

func (o *MPSBinaryImageKernel) PrimaryEdgeMode() mpscore.MPSImageEdgeMode

@property primaryEdgeMode @abstract The MPSImageEdgeMode to use when texture reads stray off the edge of the primary source image @discussion Most MPSKernel objects can read off the edge of a source image. This can happen because of a negative offset property, because the offset + clipRect.size is larger than the source image or because the filter looks at neighboring pixels, such as a Convolution or morphology filter. Default: usually MPSImageEdgeModeZero. (Some MPSKernel types default to MPSImageEdgeModeClamp, because MPSImageEdgeModeZero is either not supported or would produce unexpected results.) See Also: @ref MetalPerformanceShaders.h subsubsection_edgemode

func (*MPSBinaryImageKernel) PrimaryOffset

func (o *MPSBinaryImageKernel) PrimaryOffset() mpscore.MPSOffset

@property primaryOffset @abstract The position of the destination clip rectangle origin relative to the primary source buffer. @discussion The offset is defined to be the position of clipRect.origin in source coordinates. Default: {0,0,0}, indicating that the top left corners of the clipRect and primary source image align. See Also: @ref MetalPerformanceShaders.h subsubsection_mpsoffset

func (*MPSBinaryImageKernel) PrimarySourceRegionForDestinationSize

func (o *MPSBinaryImageKernel) PrimarySourceRegionForDestinationSize(destinationSize metal.MTLSize) mpscore.MPSRegion

primarySourceRegionForDestinationSize: is used to determine which region of the primaryTexture will be read by encodeToCommandBuffer:primaryTexture:secondaryTexture:destinationTexture (and in-place variants) when the filter runs. This information may be needed if the primary source image is broken into multiple textures. The size of the full (untiled) destination image is provided. The region of the full (untiled) source image that will be read is returned. You can then piece together an appropriate texture containing that information for use in your tiled context. The function will consult the MPSBinaryImageKernel primaryOffset and clipRect parameters, to determine the full region read by the function. Other parameters such as kernelHeight and kernelWidth will be consulted as necessary. All properties should be set to intended values prior to calling primarySourceRegionForDestinationSize:. Caution: This function operates using global image coordinates, but -encodeToCommandBuffer:... uses coordinates local to the source and destination image textures. Consequently, the primaryOffset and clipRect attached to this object will need to be updated using a global to local coordinate transform before -encodeToCommandBuffer:... is called. @abstract Determine the region of the source texture that will be read for a encode operation @param destinationSize The size of the full virtual destination image. @return The area in the virtual source image that will be read.

func (*MPSBinaryImageKernel) SecondaryEdgeMode

func (o *MPSBinaryImageKernel) SecondaryEdgeMode() mpscore.MPSImageEdgeMode

@property secondaryEdgeMode @abstract The MPSImageEdgeMode to use when texture reads stray off the edge of the secondary source image @discussion Most MPSKernel objects can read off the edge of a source image. This can happen because of a negative offset property, because the offset + clipRect.size is larger than the source image or because the filter looks at neighboring pixels, such as a Convolution or morphology filter. Default: usually MPSImageEdgeModeZero. (Some MPSKernel types default to MPSImageEdgeModeClamp, because MPSImageEdgeModeZero is either not supported or would produce unexpected results.) See Also: @ref MetalPerformanceShaders.h subsubsection_edgemode

func (*MPSBinaryImageKernel) SecondaryOffset

func (o *MPSBinaryImageKernel) SecondaryOffset() mpscore.MPSOffset

@property secondaryOffset @abstract The position of the destination clip rectangle origin relative to the secondary source buffer. @discussion The offset is defined to be the position of clipRect.origin in source coordinates. Default: {0,0,0}, indicating that the top left corners of the clipRect and secondary source image align. See Also: @ref MetalPerformanceShaders.h subsubsection_mpsoffset

func (*MPSBinaryImageKernel) SecondarySourceRegionForDestinationSize

func (o *MPSBinaryImageKernel) SecondarySourceRegionForDestinationSize(destinationSize metal.MTLSize) mpscore.MPSRegion

secondarySourceRegionForDestinationSize: is used to determine which region of the sourceTexture will be read by encodeToCommandBuffer:primaryTexture:secondaryTexture:destinationTexture (and in-place variants) when the filter runs. This information may be needed if the secondary source image is broken into multiple textures. The size of the full (untiled) destination image is provided. The region of the full (untiled) secondary source image that will be read is returned. You can then piece together an appropriate texture containing that information for use in your tiled context. The function will consult the MPSBinaryImageKernel secondaryOffset and clipRect parameters, to determine the full region read by the function. Other parameters such as kernelHeight and kernelWidth will be consulted as necessary. All properties should be set to intended values prior to calling secondarySourceRegionForDestinationSize:. Caution: This function operates using global image coordinates, but -encodeToCommandBuffer:... uses coordinates local to the source and destination image textures. Consequently, the secondaryOffset and clipRect attached to this object will need to be updated using a global to local coordinate transform before -encodeToCommandBuffer:... is called. @abstract Determine the region of the source texture that will be read for a encode operation @param destinationSize The size of the full virtual destination image. @return The area in the virtual source image that will be read.

func (*MPSBinaryImageKernel) SetClipRect

func (o *MPSBinaryImageKernel) SetClipRect(clipRect metal.MTLRegion)

func (*MPSBinaryImageKernel) SetPrimaryEdgeMode

func (o *MPSBinaryImageKernel) SetPrimaryEdgeMode(primaryEdgeMode mpscore.MPSImageEdgeMode)

func (*MPSBinaryImageKernel) SetPrimaryOffset

func (o *MPSBinaryImageKernel) SetPrimaryOffset(primaryOffset mpscore.MPSOffset)

func (*MPSBinaryImageKernel) SetSecondaryEdgeMode

func (o *MPSBinaryImageKernel) SetSecondaryEdgeMode(secondaryEdgeMode mpscore.MPSImageEdgeMode)

func (*MPSBinaryImageKernel) SetSecondaryOffset

func (o *MPSBinaryImageKernel) SetSecondaryOffset(secondaryOffset mpscore.MPSOffset)

type MPSCustomKernelIndex

type MPSCustomKernelIndex int64
const (
	MPSCustomKernelIndexDestIndex     MPSCustomKernelIndex = 0
	MPSCustomKernelIndexSrc0Index     MPSCustomKernelIndex = 0
	MPSCustomKernelIndexSrc1Index     MPSCustomKernelIndex = 1
	MPSCustomKernelIndexSrc2Index     MPSCustomKernelIndex = 2
	MPSCustomKernelIndexSrc3Index     MPSCustomKernelIndex = 3
	MPSCustomKernelIndexSrc4Index     MPSCustomKernelIndex = 4
	MPSCustomKernelIndexUserDataIndex MPSCustomKernelIndex = 30
)

func (MPSCustomKernelIndex) String

func (e MPSCustomKernelIndex) String() string

type MPSDeviceCapsValues

type MPSDeviceCapsValues int64
const (
	MPSDeviceCapsNull                        MPSDeviceCapsValues = 0
	MPSDeviceSupportsReadableArrayOfTextures MPSDeviceCapsValues = 1
	MPSDeviceSupportsWritableArrayOfTextures MPSDeviceCapsValues = 2
	MPSDeviceSupportsReadWriteTextures       MPSDeviceCapsValues = 4
	MPSDeviceSupportsSimdgroupBarrier        MPSDeviceCapsValues = 8
	MPSDeviceSupportsQuadShuffle             MPSDeviceCapsValues = 16
	MPSDeviceSupportsSimdShuffle             MPSDeviceCapsValues = 32
	MPSDeviceSupportsSimdReduction           MPSDeviceCapsValues = 64
	MPSDeviceSupportsFloat32Filtering        MPSDeviceCapsValues = 128
	MPSDeviceSupportsNorm16BicubicFiltering  MPSDeviceCapsValues = 256
	MPSDeviceSupportsFloat16BicubicFiltering MPSDeviceCapsValues = 512
	MPSDeviceIsAppleDevice                   MPSDeviceCapsValues = 1024
	MPSDeviceSupportsSimdShuffleAndFill      MPSDeviceCapsValues = 2048
	MPSDeviceSupportsBFloat16Arithmetic      MPSDeviceCapsValues = 4096
	MPSDeviceCapsLast                        MPSDeviceCapsValues = 8192
)

func (MPSDeviceCapsValues) String

func (e MPSDeviceCapsValues) String() string

type MPSImageAdd

type MPSImageAdd struct {
	MPSImageArithmetic
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageadd

func MPSImageAddFromID

func MPSImageAddFromID(id objc.ID) *MPSImageAdd

func (*MPSImageAdd) InitWithDevice

func (o *MPSImageAdd) InitWithDevice(device metal.MTLDevice) *MPSImageAdd

@abstract Initialize the addition operator @param device The device the filter will run on. @return A valid MPSImageAdd object or nil, if failure.

type MPSImageAreaMax

type MPSImageAreaMax struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageareamax

func MPSImageAreaMaxFromID

func MPSImageAreaMaxFromID(id objc.ID) *MPSImageAreaMax

func (*MPSImageAreaMax) InitWithCoderDevice

func (o *MPSImageAreaMax) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageAreaMax

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageAreaMax) InitWithDeviceKernelWidthKernelHeight

func (o *MPSImageAreaMax) InitWithDeviceKernelWidthKernelHeight(device metal.MTLDevice, kernelWidth uint, kernelHeight uint) *MPSImageAreaMax

@abstract Set the kernel height and width @param device The device the filter will run on @param kernelWidth The width of the kernel. Must be an odd number. @param kernelHeight The height of the kernel. Must be an odd number.

func (*MPSImageAreaMax) KernelHeight

func (o *MPSImageAreaMax) KernelHeight() uint

@property kernelHeight @abstract The height of the filter window. Must be an odd number.

func (*MPSImageAreaMax) KernelWidth

func (o *MPSImageAreaMax) KernelWidth() uint

@property kernelWidth @abstract The width of the filter window. Must be an odd number.

type MPSImageAreaMin

type MPSImageAreaMin struct {
	MPSImageAreaMax
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageareamin

func MPSImageAreaMinFromID

func MPSImageAreaMinFromID(id objc.ID) *MPSImageAreaMin

type MPSImageArithmetic

type MPSImageArithmetic struct {
	MPSBinaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagearithmetic

func MPSImageArithmeticFromID

func MPSImageArithmeticFromID(id objc.ID) *MPSImageArithmetic

func (*MPSImageArithmetic) Bias

func (o *MPSImageArithmetic) Bias() float32

func (*MPSImageArithmetic) MaximumValue

func (o *MPSImageArithmetic) MaximumValue() float32

@property maximumValue @abstract maximumValue is used to clamp the result of an arithmetic operation: result = clamp(result, minimumValue, maximumValue). The default value of maximumValue is FLT_MAX.

func (*MPSImageArithmetic) MinimumValue

func (o *MPSImageArithmetic) MinimumValue() float32

@property minimumValue @abstract minimumValue is to clamp the result of an arithmetic operation: result = clamp(result, minimumValue, maximumValue). The default value of minimumValue is -FLT_MAX.

func (*MPSImageArithmetic) PrimaryScale

func (o *MPSImageArithmetic) PrimaryScale() float32

func (*MPSImageArithmetic) PrimaryStrideInPixels

func (o *MPSImageArithmetic) PrimaryStrideInPixels() metal.MTLSize

@property primaryStrideInPixels @abstract The secondarySource stride in the x, y, and z dimensions. The only supported values are 0 or 1. The default value for each dimension is 1.

func (*MPSImageArithmetic) SecondaryScale

func (o *MPSImageArithmetic) SecondaryScale() float32

func (*MPSImageArithmetic) SecondaryStrideInPixels

func (o *MPSImageArithmetic) SecondaryStrideInPixels() metal.MTLSize

@property secondaryStrideInPixels @abstract The secondarySource stride in the x, y, and z dimensions. The only supported values are 0 or 1. The default value for each dimension is 1.

func (*MPSImageArithmetic) SetBias

func (o *MPSImageArithmetic) SetBias(bias float32)

func (*MPSImageArithmetic) SetMaximumValue

func (o *MPSImageArithmetic) SetMaximumValue(maximumValue float32)

func (*MPSImageArithmetic) SetMinimumValue

func (o *MPSImageArithmetic) SetMinimumValue(minimumValue float32)

func (*MPSImageArithmetic) SetPrimaryScale

func (o *MPSImageArithmetic) SetPrimaryScale(primaryScale float32)

func (*MPSImageArithmetic) SetPrimaryStrideInPixels

func (o *MPSImageArithmetic) SetPrimaryStrideInPixels(primaryStrideInPixels metal.MTLSize)

func (*MPSImageArithmetic) SetSecondaryScale

func (o *MPSImageArithmetic) SetSecondaryScale(secondaryScale float32)

func (*MPSImageArithmetic) SetSecondaryStrideInPixels

func (o *MPSImageArithmetic) SetSecondaryStrideInPixels(secondaryStrideInPixels metal.MTLSize)

type MPSImageBilinearScale

type MPSImageBilinearScale struct {
	MPSImageScale
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagebilinearscale

func MPSImageBilinearScaleFromID

func MPSImageBilinearScaleFromID(id objc.ID) *MPSImageBilinearScale

func (*MPSImageBilinearScale) InitWithCoderDevice

func (o *MPSImageBilinearScale) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageBilinearScale

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageBilinearScale) InitWithDevice

func (o *MPSImageBilinearScale) InitWithDevice(device metal.MTLDevice) *MPSImageBilinearScale

type MPSImageBox

type MPSImageBox struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagebox

func MPSImageBoxFromID

func MPSImageBoxFromID(id objc.ID) *MPSImageBox

func (*MPSImageBox) InitWithCoderDevice

func (o *MPSImageBox) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageBox

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageBox) InitWithDeviceKernelWidthKernelHeight

func (o *MPSImageBox) InitWithDeviceKernelWidthKernelHeight(device metal.MTLDevice, kernelWidth uint, kernelHeight uint) *MPSImageBox

func (*MPSImageBox) KernelHeight

func (o *MPSImageBox) KernelHeight() uint

@property kernelHeight @abstract The height of the filter window.

func (*MPSImageBox) KernelWidth

func (o *MPSImageBox) KernelWidth() uint

@property kernelWidth @abstract The width of the filter window.

type MPSImageCanny

type MPSImageCanny struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagecanny

func MPSImageCannyFromID

func MPSImageCannyFromID(id objc.ID) *MPSImageCanny

func (*MPSImageCanny) ColorTransform

func (o *MPSImageCanny) ColorTransform() *float32

@property colorTransform @discussion Returns a pointer to the array of three floats used to convert RGBA, RGB or RG images to the destination format when the destination is monochrome. Value is readonly and user should not modify or free.

func (*MPSImageCanny) HighThreshold

func (o *MPSImageCanny) HighThreshold() float32

@property highThreshold @abstract Read-write value used to set the high threshold for double thresholding, value is normalized. Default is 0.4

func (*MPSImageCanny) InitWithCoderDevice

func (o *MPSImageCanny) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageCanny

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageCanny) InitWithDevice

func (o *MPSImageCanny) InitWithDevice(device metal.MTLDevice) *MPSImageCanny

@abstract Initialize a Canny filter on a given device using the default color transform and default sigma value for Gaussian blur. Default transform: BT.601/JPEG {0.299f, 0.587f, 0.114f} Default sigma: sqrt(2) For non-default parameters, use -initWithDevice:linearGrayColorTransform:sigma: @param device The device the filter will run on @return A valid object or nil, if failure.

func (*MPSImageCanny) InitWithDeviceLinearToGrayScaleTransformSigma

func (o *MPSImageCanny) InitWithDeviceLinearToGrayScaleTransformSigma(device metal.MTLDevice, transform *float32, sigma unsafe.Pointer) *MPSImageCanny

@abstract Initialize a Canny filter on a given device with a non-default color transform and non-default sigma. @param device The device the filter will run on @param transform Array of three floats describing the rgb to gray scale color transform. @code Luminance = transform[0] * pixel.x + transform[1] * pixel.y + transform[2] * pixel.z; @endcode @param sigma The standard deviation of gaussian blur filter. Gaussian weight, centered at 0, at integer grid n is given as @code w(i) = 1/sqrt(2*pi*sigma) * exp(-n^2/2*sigma^2) @endcode If we take cut off at 1% of w(0) (max weight) beyond which weights are considered 0, we have @code ceil (sqrt(-log(0.01)*2)*sigma) ~ ceil(3.7*sigma) @endcode as rough estimate of filter width @return A valid object or nil, if failure.

func (*MPSImageCanny) LowThreshold

func (o *MPSImageCanny) LowThreshold() float32

@property lowThreshold @abstract Read-write value used to set the low threshold for double thresholding, value is normalized. Default is 0.2

func (*MPSImageCanny) SetHighThreshold

func (o *MPSImageCanny) SetHighThreshold(highThreshold float32)

func (*MPSImageCanny) SetLowThreshold

func (o *MPSImageCanny) SetLowThreshold(lowThreshold float32)

func (*MPSImageCanny) SetUseFastMode

func (o *MPSImageCanny) SetUseFastMode(useFastMode bool)

func (*MPSImageCanny) Sigma

func (o *MPSImageCanny) Sigma() float32

@property sigma @abstract Read-only sigma value used in performing Gaussian blur of the image

func (*MPSImageCanny) UseFastMode

func (o *MPSImageCanny) UseFastMode() bool

@property useFastMode @abstract Read-write value used to change algorithm to an approximation of the true Canny Edge detection Algorithm. When true, a limit is placed on how far a single strong edge can extend. The result will be similar to a true output but some edges may terminate early, resulting in minor differences for cases with long, weak edges. The performance for the approximate canny implementation is improved and should provide similar enough results for most cases. Extra tuning of the high and low thresholds as well as sigma may help achieve a more similar output in this mode. Default is YES

type MPSImageConversion

type MPSImageConversion struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageconversion

func MPSImageConversionFromID

func MPSImageConversionFromID(id objc.ID) *MPSImageConversion

func (*MPSImageConversion) DestinationAlpha

func (o *MPSImageConversion) DestinationAlpha() MPSAlphaType

@property destinationAlpha @abstract Premultiplication description for the destinationAlpha texture @discussion Colorspace conversion operations produce non-premultiplied data. Use this property to tag cases where premultiplied results are required. If MPSPixelAlpha_AlphaIsOne is used, the alpha channel will be set to 1. Default: MPSPixelAlpha_AlphaIsOne

func (*MPSImageConversion) InitWithDeviceSrcAlphaDestAlphaBackgroundColorConversionInfo

func (o *MPSImageConversion) InitWithDeviceSrcAlphaDestAlphaBackgroundColorConversionInfo(device metal.MTLDevice, srcAlpha MPSAlphaType, destAlpha MPSAlphaType, backgroundColor *float64, conversionInfo unsafe.Pointer) *MPSImageConversion

@abstract Create a converter that can convert texture colorspace, alpha and texture format @discussion Create a converter that can convert texture colorspace, alpha and MTLPixelFormat. Optimized cases exist for NULL color space converter and no alpha conversion. @param device The device the filter will run on @param srcAlpha The alpha encoding for the source texture @param destAlpha The alpha encoding for the destination texture @param backgroundColor An array of CGFloats giving the background color to use when flattening an image. The color is in the source colorspace. The length of the array is the number of color channels in the src colorspace. If NULL, use {0}. @param conversionInfo The colorspace conversion to use. May be NULL, indicating no color space conversions need to be done. @result An initialized MPSImageConversion object.

func (*MPSImageConversion) SourceAlpha

func (o *MPSImageConversion) SourceAlpha() MPSAlphaType

@property sourceAlpha @abstract Premultiplication description for the source texture @discussion Most colorspace conversion operations can not work directly on premultiplied data. Use this property to tag premultiplied data so that the source texture can be unpremultiplied prior to application of these transforms. Default: MPSPixelAlpha_AlphaIsOne

type MPSImageConvolution

type MPSImageConvolution struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageconvolution

func MPSImageConvolutionFromID

func MPSImageConvolutionFromID(id objc.ID) *MPSImageConvolution

func (*MPSImageConvolution) Bias

func (o *MPSImageConvolution) Bias() float32

@property bias @discussion The bias is a value to be added to convolved pixel before it is converted back to the storage format. It can be used to convert negative values into a representable range for a unsigned MTLPixelFormat. For example, many edge detection filters produce results in the range [-k,k]. By scaling the filter weights by 0.5/k and adding 0.5, the results will be in range [0,1] suitable for use with unorm formats. It can be used in combination with renormalization of the filter weights to do video ranging as part of the convolution effect. It can also just be used to increase the brightness of the image. Default value is 0.0f.

func (*MPSImageConvolution) InitWithCoderDevice

func (o *MPSImageConvolution) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageConvolution

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageConvolution) InitWithDeviceKernelWidthKernelHeightWeights

func (o *MPSImageConvolution) InitWithDeviceKernelWidthKernelHeightWeights(device metal.MTLDevice, kernelWidth uint, kernelHeight uint, kernelWeights *float32) *MPSImageConvolution

func (*MPSImageConvolution) KernelHeight

func (o *MPSImageConvolution) KernelHeight() uint

@property kernelHeight @abstract The height of the filter window. Must be an odd number.

func (*MPSImageConvolution) KernelWidth

func (o *MPSImageConvolution) KernelWidth() uint

@property kernelWidth @abstract The width of the filter window. Must be an odd number.

func (*MPSImageConvolution) SetBias

func (o *MPSImageConvolution) SetBias(bias float32)

type MPSImageCopyToMatrix

type MPSImageCopyToMatrix struct {
	mpscore.MPSKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagecopytomatrix

func MPSImageCopyToMatrixFromID

func MPSImageCopyToMatrixFromID(id objc.ID) *MPSImageCopyToMatrix

func (*MPSImageCopyToMatrix) DataLayout

func (o *MPSImageCopyToMatrix) DataLayout() mpscore.MPSDataLayout

@property dataLayout @abstract The data layout to use @discussion Returns the data layout. When copying from a MPSImage to a MPSMatrix, this describes the order in which the image values are stored in the buffer associated with the MPSMatrix. Default: MPSDataLayoutFeatureChannelsxHeightxWidth

func (*MPSImageCopyToMatrix) DestinationMatrixBatchIndex

func (o *MPSImageCopyToMatrix) DestinationMatrixBatchIndex() uint

@property destinationMatrixBatchIndex @discussion The index of the destination matrix in the batch. This property is modifiable and defaults to 0 at initialization time.

func (*MPSImageCopyToMatrix) DestinationMatrixOrigin

func (o *MPSImageCopyToMatrix) DestinationMatrixOrigin() metal.MTLOrigin

@property destinationMatrixOrigin @discussion The origin, relative to [0, 0] in the destination matrix, at which to start writing results. This property is modifiable and defaults to [0, 0] at initialization time. If a different origin is desired then this should be modified prior to encoding the kernel. The z value must be 0.

func (*MPSImageCopyToMatrix) EncodeBatchToCommandBufferSourceImagesDestinationMatrix

func (o *MPSImageCopyToMatrix) EncodeBatchToCommandBufferSourceImagesDestinationMatrix(commandBuffer metal.MTLCommandBuffer, sourceImages unsafe.Pointer, destinationMatrix *mpscore.MPSMatrix)

@abstract Encode a kernel that copies a MPSImageBatch to a MPSMatrix into a command buffer using a MTLComputeCommandEncoder. @discussion The kernel copies feature channels from sourceImage to the buffer associated with destinationMatrix. The kernel will not begin to execute until after the command buffer has been enqueued and committed. Each image will be copied to its own row in the matrix, starting with row destinationMatrixOrigin.x. NOTE: The destinationMatrix.dataType must match the feature channel data type in sourceImage. NOTE: All the images in the source batch should be of the same size and have numberOfImages = 1. @param commandBuffer A valid MTLCommandBuffer. @param sourceImages A valid MPSImageBatch describing the images to copy from. @param destinationMatrix A valid MPSMatrix or MPSTemporaryMatrix object describing the matrix to copy to.

func (*MPSImageCopyToMatrix) EncodeToCommandBufferSourceImageDestinationMatrix

func (o *MPSImageCopyToMatrix) EncodeToCommandBufferSourceImageDestinationMatrix(commandBuffer metal.MTLCommandBuffer, sourceImage *mpscore.MPSImage, destinationMatrix *mpscore.MPSMatrix)

@abstract Encode a kernel that copies a MPSImage to a MPSMatrix into a command buffer using a MTLComputeCommandEncoder. @discussion The kernel copies feature channels from sourceImage to the buffer associated with destinationMatrix. The kernel will not begin to execute until after the command buffer has been enqueued and committed. NOTE: The destinationMatrix.dataType must match the feature channel data type in sourceImage. @param commandBuffer A valid MTLCommandBuffer. @param sourceImage A valid MPSImage describing the image to copy from. @param destinationMatrix A valid MPSMatrix or MPSTemporaryMatrix object describing the matrix to copy to.

func (*MPSImageCopyToMatrix) InitWithCoderDevice

func (o *MPSImageCopyToMatrix) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageCopyToMatrix

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageCopyToMatrix) InitWithDeviceDataLayout

func (o *MPSImageCopyToMatrix) InitWithDeviceDataLayout(device metal.MTLDevice, dataLayout mpscore.MPSDataLayout) *MPSImageCopyToMatrix

@abstract Initialize a MPSMatrixCopy object on a device @param device The device the kernel will run on @param dataLayout The data layout @return A valid MPSMatrixCopy object or nil, if failure.

func (*MPSImageCopyToMatrix) SetDestinationMatrixBatchIndex

func (o *MPSImageCopyToMatrix) SetDestinationMatrixBatchIndex(destinationMatrixBatchIndex uint)

func (*MPSImageCopyToMatrix) SetDestinationMatrixOrigin

func (o *MPSImageCopyToMatrix) SetDestinationMatrixOrigin(destinationMatrixOrigin metal.MTLOrigin)

type MPSImageDilate

type MPSImageDilate struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagedilate

func MPSImageDilateFromID

func MPSImageDilateFromID(id objc.ID) *MPSImageDilate

func (*MPSImageDilate) InitWithCoderDevice

func (o *MPSImageDilate) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageDilate

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageDilate) InitWithDeviceKernelWidthKernelHeightValues

func (o *MPSImageDilate) InitWithDeviceKernelWidthKernelHeightValues(device metal.MTLDevice, kernelWidth uint, kernelHeight uint, values *float32) *MPSImageDilate

@abstract Init a object with kernel height, width and weight values. @discussion Each dilate shape probe defines a 3D surface of values. These are arranged in order left to right, then top to bottom in a 1D array. (values[kernelWidth*y+x] = probe[y][x]) Values should be generally be in the range [0,1] with the center pixel tending towards 0 and edges towards 1. However, any numerical value is allowed. Calculations are subject to the usual floating-point rounding error. @param device The device the filter will run on @param kernelWidth The width of the kernel. Must be an odd number. @param kernelHeight The height of the kernel. Must be an odd number. @param values The set of values to use as the dilate probe. The values are copied into the filter. To avoid image ligthening or darkening, the center value should be 0.0f.

func (*MPSImageDilate) KernelHeight

func (o *MPSImageDilate) KernelHeight() uint

@property kernelHeight @abstract The height of the filter window. Must be an odd number.

func (*MPSImageDilate) KernelWidth

func (o *MPSImageDilate) KernelWidth() uint

@property kernelWidth @abstract The width of the filter window. Must be an odd number.

type MPSImageDivide

type MPSImageDivide struct {
	MPSImageArithmetic
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagedivide

func MPSImageDivideFromID

func MPSImageDivideFromID(id objc.ID) *MPSImageDivide

func (*MPSImageDivide) InitWithDevice

func (o *MPSImageDivide) InitWithDevice(device metal.MTLDevice) *MPSImageDivide

@abstract Initialize the division operator @param device The device the filter will run on. @return A valid MPSImageDivide object or nil, if failure.

type MPSImageEDLines

type MPSImageEDLines struct {
	mpscore.MPSKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageedlines

func MPSImageEDLinesFromID

func MPSImageEDLinesFromID(id objc.ID) *MPSImageEDLines

func (*MPSImageEDLines) ClipRectSource

func (o *MPSImageEDLines) ClipRectSource() metal.MTLRegion

@property clipRectSource @abstract The source rectangle to use when reading data. @discussion A MTLRegion that indicates which part of the source to read. If the clipRectSource does not lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces the MPSUnaryImageKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture.

func (*MPSImageEDLines) DetailRatio

func (o *MPSImageEDLines) DetailRatio() uint16

@property detailRatio @abstract Read-write value used to set the detailRatio to use in the EDLines algorithm Default is 32

func (*MPSImageEDLines) EncodeToCommandBufferSourceTextureDestinationTextureEndpointBufferEndpointOffset

func (o *MPSImageEDLines) EncodeToCommandBufferSourceTextureDestinationTextureEndpointBufferEndpointOffset(commandBuffer metal.MTLCommandBuffer, source metal.MTLTexture, dest metal.MTLTexture, endpointBuffer metal.MTLBuffer, endpointOffset uint)

@abstract Encode the filter to a command buffer using a MTLComputeCommandEncoder. @discussion The filter will not begin to execute until after the command buffer has been enqueued and committed. @param commandBuffer A valid MTLCommandBuffer. @param source A valid MTLTexture containing the source image for the filter @param dest A valid MTLTexture containing the destination image for the filter. If not nil, the output will be the edges found through the Edge Drawing algorithm. @param endpointBuffer A valid MTLBuffer to receive the line segment count and endpoint results. @param endpointOffset Byte offset into endpoint buffer at which to write the line segment endpoint results. Must be a multiple of 32 bytes. The total line segment count and the line segment endpoints are written to the endpoint buffer. The count is written as a uint32_t at the start of the buffer. The line segments are written to the endpoint buffer as start and end pixel coordinates of the segment. Coordinates are stored as unsigned short pairs, and a single line segment will consist of two pairs, or four total unsigned shorts. The endpoint buffer size must be >= 4 * maxLines * sizeof(unsigned short) + sizeof(uint32_t).

func (*MPSImageEDLines) GaussianSigma

func (o *MPSImageEDLines) GaussianSigma() float32

@property sigma @abstract Read-only sigma value used in performing Gaussian blur of the image. Default is 2.0

func (*MPSImageEDLines) GradientThreshold

func (o *MPSImageEDLines) GradientThreshold() float32

@property gradientThreshold @abstract Read-write value used to set the threshold for a pixel to be considered an edge Default is 0.2

func (*MPSImageEDLines) InitWithCoderDevice

func (o *MPSImageEDLines) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageEDLines

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageEDLines) InitWithDeviceGaussianSigmaMinLineLengthMaxLinesDetailRatioGradientThresholdLineErrorThresholdMergeLocalityThreshold

func (o *MPSImageEDLines) InitWithDeviceGaussianSigmaMinLineLengthMaxLinesDetailRatioGradientThresholdLineErrorThresholdMergeLocalityThreshold(device metal.MTLDevice, gaussianSigma unsafe.Pointer, minLineLength unsafe.Pointer, maxLines uint, detailRatio unsafe.Pointer, gradientThreshold unsafe.Pointer, lineErrorThreshold unsafe.Pointer, mergeLocalityThreshold unsafe.Pointer) *MPSImageEDLines

@abstract Initialize an EDLines kernel on a given device with specified parameters. @param device The device the filter will run on @param gaussianSigma The standard deviation of gaussian blur filter. Gaussian weight, centered at 0, at integer grid i is given as @code w(i) = 1/sqrt(2*pi*sigma) * exp(-i^2/(2*sigma^2)) @endcode If we take cut off at 1% of w(0) (max weight) beyond which weights are considered 0, we have @code ceil (sqrt(-log(0.01)*2)*sigma) ~ ceil(3.7*sigma) @endcode as rough estimate of filter width @param minLineLength The minimum length of output line segments. @param maxLines The maximum amount of lines for the EDLines algorithm to output. The size of the endpointBuffer supplied at encode must be >= maxLines * 4 * sizeof(unsigned short) + sizeof(uint32_t). @param detailRatio The detailRatio to use in the EDLines algorithm, which inversely effects the number of anchor points @param gradientThreshold Any pixel with a gradient below the gradientThreshold will not be considerd an edge @param lineErrorThreshold The limit of how much error a line segment can have relative to the edge it represents @param mergeLocalityThreshold Determines how many pixels apart two lines can deviate spatially and still be merged. This value is normalized to the diagonal length of the image. @return A valid object or nil, if failure.

func (*MPSImageEDLines) LineErrorThreshold

func (o *MPSImageEDLines) LineErrorThreshold() float32

@property lineErrorThreshold @abstract Read-write value used to set the limit on error for a line segment relative to the edge it fits Default is 0.05

func (*MPSImageEDLines) MaxLines

func (o *MPSImageEDLines) MaxLines() uint

@property maxLines @abstract Read-write value used to set the max number of line segments to be written out. The endpointBuffer at encode must be >= maxLines * 4 * sizeof(unsigned short) + sizeof(uint32_t). Default is 256

func (*MPSImageEDLines) MergeLocalityThreshold

func (o *MPSImageEDLines) MergeLocalityThreshold() float32

@property mergeLocalityThreshold @abstract Read-write value used to set how many pixels apart two lines can deviate spatially and still be merged. Default is 0.0025

func (*MPSImageEDLines) MinLineLength

func (o *MPSImageEDLines) MinLineLength() uint16

@property minLineLength @abstract Read-write value used to set the minimum length of a line segment. Default is 32

func (*MPSImageEDLines) SetClipRectSource

func (o *MPSImageEDLines) SetClipRectSource(clipRectSource metal.MTLRegion)

func (*MPSImageEDLines) SetDetailRatio

func (o *MPSImageEDLines) SetDetailRatio(detailRatio uint16)

func (*MPSImageEDLines) SetGradientThreshold

func (o *MPSImageEDLines) SetGradientThreshold(gradientThreshold float32)

func (*MPSImageEDLines) SetLineErrorThreshold

func (o *MPSImageEDLines) SetLineErrorThreshold(lineErrorThreshold float32)

func (*MPSImageEDLines) SetMaxLines

func (o *MPSImageEDLines) SetMaxLines(maxLines uint)

func (*MPSImageEDLines) SetMergeLocalityThreshold

func (o *MPSImageEDLines) SetMergeLocalityThreshold(mergeLocalityThreshold float32)

func (*MPSImageEDLines) SetMinLineLength

func (o *MPSImageEDLines) SetMinLineLength(minLineLength uint16)

type MPSImageErode

type MPSImageErode struct {
	MPSImageDilate
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageerode

func MPSImageErodeFromID

func MPSImageErodeFromID(id objc.ID) *MPSImageErode

type MPSImageEuclideanDistanceTransform

type MPSImageEuclideanDistanceTransform struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageeuclideandistancetransform

func MPSImageEuclideanDistanceTransformFromID

func MPSImageEuclideanDistanceTransformFromID(id objc.ID) *MPSImageEuclideanDistanceTransform

func (*MPSImageEuclideanDistanceTransform) InitWithCoderDevice

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageEuclideanDistanceTransform) InitWithDevice

func (*MPSImageEuclideanDistanceTransform) SearchLimitRadius

func (o *MPSImageEuclideanDistanceTransform) SearchLimitRadius() float32

@property searchLimitRadius @abstract Defines a search scope size around output pixel to limit closest non-zero pixel search. Optional variable. @discussion When the non-zeroes in the input image are on average very far away from each other (ie. the distances are large), the distance calculation algorithm has to work harder to find the closest pixel. If you don't care about getting exact results beyond a certain distance you can use this property to limit the search space and speed up the kernels. In case there are no non-zero pixels within this search scope around the output pixel, then the output value will be some number that is larger than this search limit. Normally you should be fine with the default value of FLT_MAX, which results in the exact EDT, so use this only if you need additional performance. Typical good values are: 32, 64, 96, 128. Default: FLT_MAX

func (*MPSImageEuclideanDistanceTransform) SetSearchLimitRadius

func (o *MPSImageEuclideanDistanceTransform) SetSearchLimitRadius(searchLimitRadius float32)

type MPSImageFindKeypoints

type MPSImageFindKeypoints struct {
	mpscore.MPSKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagefindkeypoints

func MPSImageFindKeypointsFromID

func MPSImageFindKeypointsFromID(id objc.ID) *MPSImageFindKeypoints

func (*MPSImageFindKeypoints) EncodeToCommandBufferSourceTextureRegionsNumberOfRegionsKeypointCountBufferKeypointCountBufferOffsetKeypointDataBufferKeypointDataBufferOffset

func (o *MPSImageFindKeypoints) EncodeToCommandBufferSourceTextureRegionsNumberOfRegionsKeypointCountBufferKeypointCountBufferOffsetKeypointDataBufferKeypointDataBufferOffset(commandBuffer metal.MTLCommandBuffer, source metal.MTLTexture, regions *metal.MTLRegion, numberOfRegions uint, keypointCountBuffer metal.MTLBuffer, keypointCountBufferOffset uint, keypointDataBuffer metal.MTLBuffer, keypointDataBufferOffset uint)

@abstract Encode the filter to a command buffer using a MTLComputeCommandEncoder. @discussion The filter will not begin to execute until after the command buffer has been enqueued and committed. @param commandBuffer A valid MTLCommandBuffer. @param source A valid MTLTexture containing the source image for the filter. @param regions An array of rectangles that describe regions in the image. The list of keypoints is generated for each individual rectangle specifed. @param keypointCountBuffer The list of keypoints for each specified region @param keypointCountBufferOffset Byte offset into keypointCountBufferOffset buffer at which to write the keypoint results. Must be a multiple of 32 bytes. @param keypointDataBuffer A valid MTLBuffer to receive the keypoint data results for each rectangle. The keypoint data for keypoints in each rectangle are stored consecutively. The keypoint data for each rectangle starts at the following offset: MPSImageKeypointRangeInfo.maximumKeyPoints * rectangle index @param keypointDataBufferOffset Byte offset into keypointData buffer at which to write the keypoint results. Must be a multiple of 32 bytes.

func (*MPSImageFindKeypoints) InitWithCoderDevice

func (o *MPSImageFindKeypoints) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageFindKeypoints

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageFindKeypoints) InitWithDeviceInfo

func (*MPSImageFindKeypoints) KeypointRangeInfo

func (o *MPSImageFindKeypoints) KeypointRangeInfo() MPSImageKeypointRangeInfo

@property keypointRangeInfo @abstract Return a structure describing the keypoint range info @discussion Returns a MPSImageKeypointRangeInfo structure

type MPSImageGaussianBlur

type MPSImageGaussianBlur struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagegaussianblur

func MPSImageGaussianBlurFromID

func MPSImageGaussianBlurFromID(id objc.ID) *MPSImageGaussianBlur

func (*MPSImageGaussianBlur) InitWithCoderDevice

func (o *MPSImageGaussianBlur) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageGaussianBlur

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageGaussianBlur) InitWithDeviceSigma

func (o *MPSImageGaussianBlur) InitWithDeviceSigma(device metal.MTLDevice, sigma float32) *MPSImageGaussianBlur

func (*MPSImageGaussianBlur) Sigma

func (o *MPSImageGaussianBlur) Sigma() float32

@property sigma @abstract Read-only sigma value with which filter was created

type MPSImageGaussianPyramid

type MPSImageGaussianPyramid struct {
	MPSImagePyramid
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagegaussianpyramid

func MPSImageGaussianPyramidFromID

func MPSImageGaussianPyramidFromID(id objc.ID) *MPSImageGaussianPyramid

type MPSImageGuidedFilter

type MPSImageGuidedFilter struct {
	mpscore.MPSKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageguidedfilter

func MPSImageGuidedFilterFromID

func MPSImageGuidedFilterFromID(id objc.ID) *MPSImageGuidedFilter

func (*MPSImageGuidedFilter) EncodeReconstructionToCommandBufferGuidanceTextureCoefficientsTextureACoefficientsTextureBDestinationTexture

func (o *MPSImageGuidedFilter) EncodeReconstructionToCommandBufferGuidanceTextureCoefficientsTextureACoefficientsTextureBDestinationTexture(commandBuffer metal.MTLCommandBuffer, guidanceTexture metal.MTLTexture, coefficientsTextureA metal.MTLTexture, coefficientsTextureB metal.MTLTexture, destinationTexture metal.MTLTexture)

@abstract Perform Guided Filter Reconstruction (inference) to produce the filtered output @discussion The filter will not begin to execute until after the command buffer has been enqueued and committed. @param commandBuffer A valid MTLCommandBuffer. @param guidanceTexture Input guidance pixel buffer. @param coefficientsTextureA Input coefficients A texture generated generated by a previous encodeRegressionToCommandBuffer. @param coefficientsTextureB Input coefficients B texture generated generated by a previous encodeRegressionToCommandBuffer. @param destinationTexture Output texture

func (*MPSImageGuidedFilter) EncodeReconstructionToCommandBufferGuidanceTextureCoefficientsTextureDestinationTexture

func (o *MPSImageGuidedFilter) EncodeReconstructionToCommandBufferGuidanceTextureCoefficientsTextureDestinationTexture(commandBuffer metal.MTLCommandBuffer, guidanceTexture metal.MTLTexture, coefficientsTexture metal.MTLTexture, destinationTexture metal.MTLTexture)

@abstract Perform Guided Filter Reconstruction (inference) to produce the filtered output @discussion The filter will not begin to execute until after the command buffer has been enqueued and committed. @pparam sourceGuidanceTexture Input guidance pixel buffer. This should be a color (RGB) image. @pparam coefficientsTexture Input coefficients texture generated generated by a previous encodeRegressionToCommandBuffer @param destinationTexture Output texture Note: The coefficients are upsampled at the reconstruction of the filtered data. Reconstruct(guidance RGB) = a.r * R + a.g * G + a.b * B + b, where a and b are the coefficients learnt using encodeRegressionToCommandBuffer. Final reconstructed value = value * reconstructScale + reconstructOffset

func (*MPSImageGuidedFilter) EncodeRegressionToCommandBufferSourceTextureGuidanceTextureWeightsTextureDestinationCoefficientsTexture

func (o *MPSImageGuidedFilter) EncodeRegressionToCommandBufferSourceTextureGuidanceTextureWeightsTextureDestinationCoefficientsTexture(commandBuffer metal.MTLCommandBuffer, sourceTexture metal.MTLTexture, guidanceTexture metal.MTLTexture, weightsTexture metal.MTLTexture, destinationCoefficientsTexture metal.MTLTexture)

@abstract Perform Guided Filter Regression (correlation) to produce a coefficients texture @discussion The filter will not begin to execute until after the command buffer has been enqueued and committed. @param commandBuffer A valid MTLCommandBuffer. @param sourceTexture Input source texture to be filtered (typically a mask). This should be a single channel image. @param guidanceTexture Input guidance texture. This should be a color (RGB) image. @param weightsTexture Optional input confidence texture. This should also a single channel image. @param destinationCoefficientsTexture Output texture with four coefficients that minimize the mean squared error between the source and an affine function of guidance R, G, B. Note: The destinationCoefficientsTexture computes the linear cofficients "a" and "b". The "a" coefficient is stored in the RGB channels of destinationCoefficientsTexture and the "b" coefficient in the alpha chnanel. Set the MPSKernelOptionsAllowReducedPrecision in the "options" property for this kernel to peform the computations using half-precision arithmetic. This can potentially improve performance and/or power usage.

func (*MPSImageGuidedFilter) EncodeRegressionToCommandBufferSourceTextureGuidanceTextureWeightsTextureDestinationCoefficientsTextureADestinationCoefficientsTextureB

func (o *MPSImageGuidedFilter) EncodeRegressionToCommandBufferSourceTextureGuidanceTextureWeightsTextureDestinationCoefficientsTextureADestinationCoefficientsTextureB(commandBuffer metal.MTLCommandBuffer, sourceTexture metal.MTLTexture, guidanceTexture metal.MTLTexture, weightsTexture metal.MTLTexture, destinationCoefficientsTextureA metal.MTLTexture, destinationCoefficientsTextureB metal.MTLTexture)

@abstract Perform per-channel (non-color correlated) Guided Filter Regression (correlation) to produce a coefficients texture @discussion The filter will not begin to execute until after the command buffer has been enqueued and committed. This encode call differs from the one above in that the correlations are not computed across channels and therefore this filter computes two coefficient textures: ai and bi. @param commandBuffer A valid MTLCommandBuffer. @param sourceTexture Input source texture to be filtered. @param guidanceTexture Input guidance texture. This should be a color (RGB) image. @param weightsTexture Optional input confidence texture. This should be a single channel image. @param destinationCoefficientsTextureA Output texture with four coefficients A that minimize the mean squared error between the source channels and an affine function of guidance channels. @param destinationCoefficientsTextureB Output texture with four coefficients B that minimize the mean squared error between the source channels and an affine function of guidance channels. Set the MPSKernelOptionsAllowReducedPrecision in the "options" property for this kernel to peform the computations using half-precision arithmetic. This can potentially improve performance and/or power usage.

func (*MPSImageGuidedFilter) Epsilon

func (o *MPSImageGuidedFilter) Epsilon() float32

@property epsilon @abstract The regularization parameter @discussion The parameter used when computing the linear coefficients a and b.

func (*MPSImageGuidedFilter) InitWithCoderDevice

func (o *MPSImageGuidedFilter) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageGuidedFilter

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageGuidedFilter) InitWithDeviceKernelDiameter

func (o *MPSImageGuidedFilter) InitWithDeviceKernelDiameter(device metal.MTLDevice, kernelDiameter uint) *MPSImageGuidedFilter

@abstract Specifies information to apply the guided filter regression. @param device The device the filter will run on @param kernelDiameter The local window size @return A valid MPSImageGuidedFilterRegression object or nil, if failure.

func (*MPSImageGuidedFilter) KernelDiameter

func (o *MPSImageGuidedFilter) KernelDiameter() uint

@property kernelDiameter @abstract The local window size @discussion The local window size.

func (*MPSImageGuidedFilter) ReconstructOffset

func (o *MPSImageGuidedFilter) ReconstructOffset() float32

@property reconstructOffset @abstract The offset parameter @discussion The offset parameter added to the result of the scaled reconstructed value. The default value is 0.0f.

func (*MPSImageGuidedFilter) ReconstructScale

func (o *MPSImageGuidedFilter) ReconstructScale() float32

@property reconstructScale @abstract The scale parameter @discussion The parameter used to scale the result of the reconstruction operation. The default value is 1.0f.

func (*MPSImageGuidedFilter) SetEpsilon

func (o *MPSImageGuidedFilter) SetEpsilon(epsilon float32)

func (*MPSImageGuidedFilter) SetReconstructOffset

func (o *MPSImageGuidedFilter) SetReconstructOffset(reconstructOffset float32)

func (*MPSImageGuidedFilter) SetReconstructScale

func (o *MPSImageGuidedFilter) SetReconstructScale(reconstructScale float32)

type MPSImageHistogram

type MPSImageHistogram struct {
	mpscore.MPSKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagehistogram

func MPSImageHistogramFromID

func MPSImageHistogramFromID(id objc.ID) *MPSImageHistogram

func (*MPSImageHistogram) ClipRectSource

func (o *MPSImageHistogram) ClipRectSource() metal.MTLRegion

@property clipRectSource @abstract The source rectangle to use when reading data. @discussion A MTLRegion that indicates which part of the source to read. If the clipRectSource does not lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces the MPSUnaryImageKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture.

func (*MPSImageHistogram) EncodeToCommandBufferSourceTextureHistogramHistogramOffset

func (o *MPSImageHistogram) EncodeToCommandBufferSourceTextureHistogramHistogramOffset(commandBuffer metal.MTLCommandBuffer, source metal.MTLTexture, histogram metal.MTLBuffer, histogramOffset uint)

@abstract Encode the filter to a command buffer using a MTLComputeCommandEncoder. @discussion The filter will not begin to execute until after the command buffer has been enqueued and committed. @param commandBuffer A valid MTLCommandBuffer. @param source A valid MTLTexture containing the source image for the filter @param histogram A valid MTLBuffer to receive the histogram results. @param histogramOffset Byte offset into histogram buffer at which to write the histogram results. Must be a multiple of 32 bytes. The histogram results / channel are stored together. The number of channels for which histogram results are stored is determined by the number of channels in the image. If histogramInfo.histogramForAlpha is false and the source image is RGBA then only histogram results for RGB channels are stored. The histogram results are stored in the histogram buffer as follows: - histogram results for the R channel for all bins followed by - histogram results for the G channel for all bins followed by - histogram results for the B channel for all bins followed by - histogram results for the A channel for all bins

func (*MPSImageHistogram) HistogramInfo

func (o *MPSImageHistogram) HistogramInfo() MPSImageHistogramInfo

@property histogramInfo @abstract Return a structure describing the histogram content @discussion Returns a MPSImageHistogramInfo structure describing the format of the histogram.

func (*MPSImageHistogram) HistogramSizeForSourceFormat

func (o *MPSImageHistogram) HistogramSizeForSourceFormat(sourceFormat metal.MTLPixelFormat) uint

@abstract The amount of space in the output MTLBuffer the histogram will take up. @discussion This convenience function calculates the minimum amount of space needed in the output histogram for the results. The MTLBuffer should be at least this length, longer if histogramOffset is non-zero. @param sourceFormat The MTLPixelFormat of the source image. This is the source parameter of -encodeToCommandBuffer: sourceTexture:histogram:histogramOffset @return The number of bytes needed to store the result histograms.

func (*MPSImageHistogram) InitWithCoderDevice

func (o *MPSImageHistogram) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageHistogram

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageHistogram) InitWithDeviceHistogramInfo

func (o *MPSImageHistogram) InitWithDeviceHistogramInfo(device metal.MTLDevice, histogramInfo *MPSImageHistogramInfo) *MPSImageHistogram

func (*MPSImageHistogram) MinPixelThresholdValue

func (o *MPSImageHistogram) MinPixelThresholdValue() unsafe.Pointer

@property minPixelThresholdValue @abstract The minimum pixel threshold value @discussion The histogram entries will be incremented only if pixel value is >= minPixelThresholdValue. The minPixelThresholdValue is a floating-point value. For unsigned normalized textures, the minPixelThresholdValue should be a value between 0.0f and 1.0f (for eg. MTLPixelFormatRGBA8Unorm). For signed normalized textures, the minPixelThresholdValue should be a value between -1.0f and 1.0f (for eg. MTLPixelFormatRGBA8Snorm). Default: vector_float4(0.0f).

func (*MPSImageHistogram) SetClipRectSource

func (o *MPSImageHistogram) SetClipRectSource(clipRectSource metal.MTLRegion)

func (*MPSImageHistogram) SetMinPixelThresholdValue

func (o *MPSImageHistogram) SetMinPixelThresholdValue(minPixelThresholdValue unsafe.Pointer)

func (*MPSImageHistogram) SetZeroHistogram

func (o *MPSImageHistogram) SetZeroHistogram(zeroHistogram bool)

func (*MPSImageHistogram) ZeroHistogram

func (o *MPSImageHistogram) ZeroHistogram() bool

@property zeroHistogram @abstract Zero-initalize the histogram results @discussion Indicates that the memory region in which the histogram results are to be written in the histogram buffer are to be zero-initialized or not. Default: YES.

type MPSImageHistogramEqualization

type MPSImageHistogramEqualization struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagehistogramequalization

func MPSImageHistogramEqualizationFromID

func MPSImageHistogramEqualizationFromID(id objc.ID) *MPSImageHistogramEqualization

func (*MPSImageHistogramEqualization) EncodeTransformToCommandBufferSourceTextureHistogramHistogramOffset

func (o *MPSImageHistogramEqualization) EncodeTransformToCommandBufferSourceTextureHistogramHistogramOffset(commandBuffer metal.MTLCommandBuffer, source metal.MTLTexture, histogram metal.MTLBuffer, histogramOffset uint)

@abstract Encode the transform function to a command buffer using a MTLComputeCommandEncoder. The transform function computes the equalization lookup table. @discussion The transform function will not begin to execute until after the command buffer has been enqueued and committed. This step will need to be repeated with the new MPSKernel if -copyWithZone:device or -copyWithZone: is called. The transform is stored as internal state to the object. You still need to call -encodeToCommandBuffer:sourceTexture:destinationTexture: afterward to apply the transform to produce a result texture. @param commandBuffer A valid MTLCommandBuffer. @param source A valid MTLTexture containing the source image for the filter. @param histogram A valid MTLBuffer containing the histogram results for an image. This filter will use these histogram results to generate the cumulative histogram for equalizing the image. The histogram results / channel are stored together. The number of channels for which histogram results are stored is determined by the number of channels in the image. If histogramInfo.histogramForAlpha is false and the source image is RGBA then only histogram results for RGB channels are stored. @param histogramOffset A byte offset into the histogram MTLBuffer where the histogram starts. Must conform to alignment requirements for [MTLComputeCommandEncoder setBuffer:offset:atIndex:] offset parameter.

func (*MPSImageHistogramEqualization) HistogramInfo

@property histogramInfo @abstract Return a structure describing the histogram content @discussion Returns a MPSImageHistogramInfo structure describing the format of the histogram.

func (*MPSImageHistogramEqualization) InitWithCoderDevice

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageHistogramEqualization) InitWithDeviceHistogramInfo

func (o *MPSImageHistogramEqualization) InitWithDeviceHistogramInfo(device metal.MTLDevice, histogramInfo *MPSImageHistogramInfo) *MPSImageHistogramEqualization

type MPSImageHistogramInfo

type MPSImageHistogramInfo struct {
	NumberOfHistogramEntries uint
	HistogramForAlpha        bool
	MinPixelValue            unsafe.Pointer
	MaxPixelValue            unsafe.Pointer
}

@brief Specifies information to compute the histogram for channels of an image.

type MPSImageHistogramSpecification

type MPSImageHistogramSpecification struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagehistogramspecification

func MPSImageHistogramSpecificationFromID

func MPSImageHistogramSpecificationFromID(id objc.ID) *MPSImageHistogramSpecification

func (*MPSImageHistogramSpecification) EncodeTransformToCommandBufferSourceTextureSourceHistogramSourceHistogramOffsetDesiredHistogramDesiredHistogramOffset

func (o *MPSImageHistogramSpecification) EncodeTransformToCommandBufferSourceTextureSourceHistogramSourceHistogramOffsetDesiredHistogramDesiredHistogramOffset(commandBuffer metal.MTLCommandBuffer, source metal.MTLTexture, sourceHistogram metal.MTLBuffer, sourceHistogramOffset uint, desiredHistogram metal.MTLBuffer, desiredHistogramOffset uint)

@abstract Encode the transform function to a command buffer using a MTLComputeCommandEncoder. The transform function computes the specification lookup table. @discussion The transform function will not begin to execute until after the command buffer has been enqueued and committed. This step will need to be repeated with the new MPSKernel if -copyWithZone:device or -copyWithZone: is called. @param commandBuffer A valid MTLCommandBuffer. @param source A valid MTLTexture containing the source image for the filter. @param sourceHistogram A valid MTLBuffer containing the histogram results for the source image. This filter will use these histogram results to generate the cumulative histogram for equalizing the image. The histogram results / channel are stored together. The number of channels for which histogram results are stored is determined by the number of channels in the image. If histogramInfo.histogramForAlpha is false and the source image is RGBA then only histogram results for RGB channels are stored. @param sourceHistogramOffset A byte offset into the sourceHistogram MTLBuffer where the histogram starts. Must conform to alignment requirements for [MTLComputeCommandEncoder setBuffer:offset:atIndex:] offset parameter. @param desiredHistogram A valid MTLBuffer containing the desired histogram results for the source image. The histogram results / channel are stored together. The number of channels for which histogram results are stored is determined by the number of channels in the image. If histogramInfo.histogramForAlpha is false and the source image is RGBA then only histogram results for RGB channels are stored. @param desiredHistogramOffset A byte offset into the desiredHistogram MTLBuffer where the histogram starts. Must conform to alignment requirements for [MTLComputeCommandEncoder setBuffer:offset:atIndex:] offset parameter.

func (*MPSImageHistogramSpecification) HistogramInfo

@property histogramInfo @abstract Return a structure describing the histogram content @discussion Returns a MPSImageHistogramInfo structure describing the format of the histogram.

func (*MPSImageHistogramSpecification) InitWithCoderDevice

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageHistogramSpecification) InitWithDeviceHistogramInfo

func (o *MPSImageHistogramSpecification) InitWithDeviceHistogramInfo(device metal.MTLDevice, histogramInfo *MPSImageHistogramInfo) *MPSImageHistogramSpecification

type MPSImageIntegral

type MPSImageIntegral struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageintegral

func MPSImageIntegralFromID

func MPSImageIntegralFromID(id objc.ID) *MPSImageIntegral

type MPSImageIntegralOfSquares

type MPSImageIntegralOfSquares struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimageintegralofsquares

func MPSImageIntegralOfSquaresFromID

func MPSImageIntegralOfSquaresFromID(id objc.ID) *MPSImageIntegralOfSquares

type MPSImageKeypointData

type MPSImageKeypointData struct {
	KeypointCoordinate unsafe.Pointer
	KeypointColorValue float32
}

@brief Specifies keypoint information.

type MPSImageKeypointRangeInfo

type MPSImageKeypointRangeInfo struct {
	MaximumKeypoints      uint
	MinimumThresholdValue float32
}

@brief Specifies information to find the keypoints in an image.

type MPSImageLanczosScale

type MPSImageLanczosScale struct {
	MPSImageScale
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagelanczosscale

func MPSImageLanczosScaleFromID

func MPSImageLanczosScaleFromID(id objc.ID) *MPSImageLanczosScale

func (*MPSImageLanczosScale) InitWithCoderDevice

func (o *MPSImageLanczosScale) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageLanczosScale

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageLanczosScale) InitWithDevice

func (o *MPSImageLanczosScale) InitWithDevice(device metal.MTLDevice) *MPSImageLanczosScale

type MPSImageLaplacian

type MPSImageLaplacian struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagelaplacian

func MPSImageLaplacianFromID

func MPSImageLaplacianFromID(id objc.ID) *MPSImageLaplacian

func (*MPSImageLaplacian) Bias

func (o *MPSImageLaplacian) Bias() float32

@property bias @discussion The bias is a value to be added to convolved pixel before it is converted back to the storage format. It can be used to convert negative values into a representable range for a unsigned MTLPixelFormat. For example, many edge detection filters produce results in the range [-k,k]. By scaling the filter weights by 0.5/k and adding 0.5, the results will be in range [0,1] suitable for use with unorm formats. It can be used in combination with renormalization of the filter weights to do video ranging as part of the convolution effect. It can also just be used to increase the brightness of the image. Default value is 0.0f.

func (*MPSImageLaplacian) SetBias

func (o *MPSImageLaplacian) SetBias(bias float32)

type MPSImageLaplacianPyramid

type MPSImageLaplacianPyramid struct {
	MPSImagePyramid
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagelaplacianpyramid

func MPSImageLaplacianPyramidFromID

func MPSImageLaplacianPyramidFromID(id objc.ID) *MPSImageLaplacianPyramid

func (*MPSImageLaplacianPyramid) GetLaplacianBias

func (o *MPSImageLaplacianPyramid) GetLaplacianBias() float32

func (*MPSImageLaplacianPyramid) GetLaplacianScale

func (o *MPSImageLaplacianPyramid) GetLaplacianScale() float32

func (*MPSImageLaplacianPyramid) SetLaplacianBias

func (o *MPSImageLaplacianPyramid) SetLaplacianBias(laplacianBias float32)

func (*MPSImageLaplacianPyramid) SetLaplacianScale

func (o *MPSImageLaplacianPyramid) SetLaplacianScale(laplacianScale float32)

type MPSImageMedian

type MPSImageMedian struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagemedian

func MPSImageMedianFromID

func MPSImageMedianFromID(id objc.ID) *MPSImageMedian

func (*MPSImageMedian) InitWithCoderDevice

func (o *MPSImageMedian) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageMedian

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageMedian) InitWithDeviceKernelDiameter

func (o *MPSImageMedian) InitWithDeviceKernelDiameter(device metal.MTLDevice, kernelDiameter uint) *MPSImageMedian

func (*MPSImageMedian) KernelDiameter

func (o *MPSImageMedian) KernelDiameter() uint

@property kernelDiameter @abstract The diameter in pixels of the filter window. @discussion The median filter is applied to a kernelDiameter x kernelDiameter window of pixels centered on the corresponding source pixel for each destination pixel. The kernel diameter must be an odd number.

type MPSImageMultiply

type MPSImageMultiply struct {
	MPSImageArithmetic
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagemultiply

func MPSImageMultiplyFromID

func MPSImageMultiplyFromID(id objc.ID) *MPSImageMultiply

func (*MPSImageMultiply) InitWithDevice

func (o *MPSImageMultiply) InitWithDevice(device metal.MTLDevice) *MPSImageMultiply

@abstract Initialize the multiplication operator @param device The device the filter will run on. @return A valid MPSImageMultiply object or nil, if failure.

type MPSImageNormalizedHistogram

type MPSImageNormalizedHistogram struct {
	mpscore.MPSKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagenormalizedhistogram

func MPSImageNormalizedHistogramFromID

func MPSImageNormalizedHistogramFromID(id objc.ID) *MPSImageNormalizedHistogram

func (*MPSImageNormalizedHistogram) ClipRectSource

func (o *MPSImageNormalizedHistogram) ClipRectSource() metal.MTLRegion

@property clipRectSource @abstract The source rectangle to use when reading data. @discussion A MTLRegion that indicates which part of the source to read. If the clipRectSource does not lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces the MPSUnaryImageKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture.

func (*MPSImageNormalizedHistogram) EncodeToCommandBufferSourceTextureMinmaxTextureHistogramHistogramOffset

func (o *MPSImageNormalizedHistogram) EncodeToCommandBufferSourceTextureMinmaxTextureHistogramHistogramOffset(commandBuffer metal.MTLCommandBuffer, source metal.MTLTexture, minmaxTexture metal.MTLTexture, histogram metal.MTLBuffer, histogramOffset uint)

@abstract Encode the filter to a command buffer using a MTLComputeCommandEncoder. @discussion The filter will not begin to execute until after the command buffer has been enqueued and committed. @param commandBuffer A valid MTLCommandBuffer. @param source A valid MTLTexture containing the source image for the filter @param minmaxTexture A valid MTLTexture in which the min/max pixel values from source will be returned @param histogram A valid MTLBuffer to receive the histogram results. @param histogramOffset Byte offset into histogram buffer at which to write the histogram results. Must be a multiple of 32 bytes. The histogram results / channel are stored together. The number of channels for which histogram results are stored is determined by the number of channels in the image. If histogramInfo.histogramForAlpha is false and the source image is RGBA then only histogram results for RGB channels are stored. The histogram results are stored in the histogram buffer as follows: - histogram results for the R channel for all bins followed by - histogram results for the G channel for all bins followed by - histogram results for the B channel for all bins followed by - histogram results for the A channel for all bins

func (*MPSImageNormalizedHistogram) HistogramInfo

@property histogramInfo @abstract Return a structure describing the histogram content @discussion Returns a MPSImageHistogramInfo structure describing the format of the histogram.

func (*MPSImageNormalizedHistogram) HistogramSizeForSourceFormat

func (o *MPSImageNormalizedHistogram) HistogramSizeForSourceFormat(sourceFormat metal.MTLPixelFormat) uint

@abstract The amount of space in the output MTLBuffer the histogram will take up. @discussion This convenience function calculates the minimum amount of space needed in the output histogram for the results. The MTLBuffer should be at least this length, longer if histogramOffset is non-zero. @param sourceFormat The MTLPixelFormat of the source image. This is the source parameter of -encodeToCommandBuffer: sourceTexture:histogram:histogramOffset @return The number of bytes needed to store the result histograms.

func (*MPSImageNormalizedHistogram) InitWithCoderDevice

func (o *MPSImageNormalizedHistogram) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageNormalizedHistogram

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageNormalizedHistogram) InitWithDeviceHistogramInfo

func (o *MPSImageNormalizedHistogram) InitWithDeviceHistogramInfo(device metal.MTLDevice, histogramInfo *MPSImageHistogramInfo) *MPSImageNormalizedHistogram

func (*MPSImageNormalizedHistogram) SetClipRectSource

func (o *MPSImageNormalizedHistogram) SetClipRectSource(clipRectSource metal.MTLRegion)

func (*MPSImageNormalizedHistogram) SetZeroHistogram

func (o *MPSImageNormalizedHistogram) SetZeroHistogram(zeroHistogram bool)

func (*MPSImageNormalizedHistogram) ZeroHistogram

func (o *MPSImageNormalizedHistogram) ZeroHistogram() bool

@property zeroHistogram @abstract Zero-initalize the histogram results @discussion Indicates that the memory region in which the histogram results are to be written in the histogram buffer are to be zero-initialized or not. Default: YES.

type MPSImagePyramid

type MPSImagePyramid struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagepyramid

func MPSImagePyramidFromID

func MPSImagePyramidFromID(id objc.ID) *MPSImagePyramid

func (*MPSImagePyramid) InitWithCoderDevice

func (o *MPSImagePyramid) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImagePyramid

@abstract NSSecureCoding compatability @discussion See @ref MPSKernel#initWithCoder. @param aDecoder The NSCoder subclass with your serialized MPSCNNPooling @param device The MTLDevice on which to make the MPSCNNPooling @return A new MPSCNNPooling object, or nil if failure.

func (*MPSImagePyramid) InitWithDevice

func (o *MPSImagePyramid) InitWithDevice(device metal.MTLDevice) *MPSImagePyramid

func (*MPSImagePyramid) InitWithDeviceCenterWeight

func (o *MPSImagePyramid) InitWithDeviceCenterWeight(device metal.MTLDevice, centerWeight float32) *MPSImagePyramid

func (*MPSImagePyramid) InitWithDeviceKernelWidthKernelHeightWeights

func (o *MPSImagePyramid) InitWithDeviceKernelWidthKernelHeightWeights(device metal.MTLDevice, kernelWidth uint, kernelHeight uint, kernelWeights *float32) *MPSImagePyramid

func (*MPSImagePyramid) KernelHeight

func (o *MPSImagePyramid) KernelHeight() uint

@property kernelHeight @abstract The height of the filter window. Must be an odd number.

func (*MPSImagePyramid) KernelWidth

func (o *MPSImagePyramid) KernelWidth() uint

@property kernelWidth @abstract The width of the filter window. Must be an odd number.

type MPSImageReduceColumnMax

type MPSImageReduceColumnMax struct {
	MPSImageReduceUnary
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagereducecolumnmax

func MPSImageReduceColumnMaxFromID

func MPSImageReduceColumnMaxFromID(id objc.ID) *MPSImageReduceColumnMax

func (*MPSImageReduceColumnMax) InitWithDevice

type MPSImageReduceColumnMean

type MPSImageReduceColumnMean struct {
	MPSImageReduceUnary
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagereducecolumnmean

func MPSImageReduceColumnMeanFromID

func MPSImageReduceColumnMeanFromID(id objc.ID) *MPSImageReduceColumnMean

func (*MPSImageReduceColumnMean) InitWithDevice

type MPSImageReduceColumnMin

type MPSImageReduceColumnMin struct {
	MPSImageReduceUnary
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagereducecolumnmin

func MPSImageReduceColumnMinFromID

func MPSImageReduceColumnMinFromID(id objc.ID) *MPSImageReduceColumnMin

func (*MPSImageReduceColumnMin) InitWithDevice

type MPSImageReduceColumnSum

type MPSImageReduceColumnSum struct {
	MPSImageReduceUnary
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagereducecolumnsum

func MPSImageReduceColumnSumFromID

func MPSImageReduceColumnSumFromID(id objc.ID) *MPSImageReduceColumnSum

func (*MPSImageReduceColumnSum) InitWithDevice

type MPSImageReduceRowMax

type MPSImageReduceRowMax struct {
	MPSImageReduceUnary
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagereducerowmax

func MPSImageReduceRowMaxFromID

func MPSImageReduceRowMaxFromID(id objc.ID) *MPSImageReduceRowMax

func (*MPSImageReduceRowMax) InitWithDevice

func (o *MPSImageReduceRowMax) InitWithDevice(device metal.MTLDevice) *MPSImageReduceRowMax

type MPSImageReduceRowMean

type MPSImageReduceRowMean struct {
	MPSImageReduceUnary
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagereducerowmean

func MPSImageReduceRowMeanFromID

func MPSImageReduceRowMeanFromID(id objc.ID) *MPSImageReduceRowMean

func (*MPSImageReduceRowMean) InitWithDevice

func (o *MPSImageReduceRowMean) InitWithDevice(device metal.MTLDevice) *MPSImageReduceRowMean

type MPSImageReduceRowMin

type MPSImageReduceRowMin struct {
	MPSImageReduceUnary
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagereducerowmin

func MPSImageReduceRowMinFromID

func MPSImageReduceRowMinFromID(id objc.ID) *MPSImageReduceRowMin

func (*MPSImageReduceRowMin) InitWithDevice

func (o *MPSImageReduceRowMin) InitWithDevice(device metal.MTLDevice) *MPSImageReduceRowMin

type MPSImageReduceRowSum

type MPSImageReduceRowSum struct {
	MPSImageReduceUnary
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagereducerowsum

func MPSImageReduceRowSumFromID

func MPSImageReduceRowSumFromID(id objc.ID) *MPSImageReduceRowSum

func (*MPSImageReduceRowSum) InitWithDevice

func (o *MPSImageReduceRowSum) InitWithDevice(device metal.MTLDevice) *MPSImageReduceRowSum

type MPSImageReduceUnary

type MPSImageReduceUnary struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagereduceunary

func MPSImageReduceUnaryFromID

func MPSImageReduceUnaryFromID(id objc.ID) *MPSImageReduceUnary

func (*MPSImageReduceUnary) ClipRectSource

func (o *MPSImageReduceUnary) ClipRectSource() metal.MTLRegion

@property clipRectSource @abstract The source rectangle to use when reading data. @discussion A MTLRegion that indicates which part of the source to read. If the clipRectSource does not lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces the MPSUnaryImageKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture. The clipRect specified in MPSUnaryImageKernel is used to control the origin in the destination texture where the min, max values are written. The clipRect.width must be >=2. The clipRect.height must be >= 1.

func (*MPSImageReduceUnary) SetClipRectSource

func (o *MPSImageReduceUnary) SetClipRectSource(clipRectSource metal.MTLRegion)

type MPSImageScale

type MPSImageScale struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagescale

func MPSImageScaleFromID

func MPSImageScaleFromID(id objc.ID) *MPSImageScale

func (*MPSImageScale) InitWithCoderDevice

func (o *MPSImageScale) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageScale

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageScale) InitWithDevice

func (o *MPSImageScale) InitWithDevice(device metal.MTLDevice) *MPSImageScale

func (*MPSImageScale) ScaleTransform

func (o *MPSImageScale) ScaleTransform() *mpscore.MPSScaleTransform

@property scaleTransform @abstract An optional transform that describes how to scale and translate the source image @discussion If the scaleTransform is NULL, then any image scaling factor such as MPSImageLanczosScale will rescale the image so that the source image fits exactly into the destination texture. If the transform is not NULL, then the transform is used for determining how to map the source image to the destination. Default: NULL When the scaleTransform is set to non-NULL, the values pointed to by the new scaleTransform are copied to object storage, and the pointer is updated to point to internal storage. Do not attempt to free it. You may free your copy of the MPSScaleTransform as soon as the property set operation is complete. When calculating a scaleTransform, use the limits of the bounding box for the intended source region of interest and the destination clipRect. Adjustments for pixel center coordinates are handled internally to the function. For example, the scale transform to convert the entire source image to the entire destination image size (clipRect = MPSRectNoClip) would be: @code scaleTransform.scaleX = (double) dest.width / source.width; scaleTransform.scaleY = (double) dest.height / source.height; scaleTransform.translateX = scaleTransform.translateY = 0.0; @endcode The translation parameters allow you to adjust the region of the source image used to create the destination image. They are in destination coordinates. To place the top left corner of the destination clipRect to represent the position {x,y} in source coordinates, we solve for the translation based on the standard scale matrix operation for each axis: @code dest_position = source_position * scale + translation; translation = dest_position - source_position * scale; @endcode For the top left corner of the clipRect, the dest_position is considered to be {0,0}. This gives us a translation of: @code scaleTransform.translateX = -source_origin.x * scaleTransform.scaleX; scaleTransform.translateY = -source_origin.y * scaleTransform.scaleY; @endcode One would typically use non-zero translations to do tiling, or provide a resized view into a internal segment of an image. NOTE: Changing the Lanczos scale factor may trigger recalculation of signficant state internal to the object when the filter is encoded to the command buffer. The scale factor is scaleTransform->scaleX,Y, or the ratio of source and destination image sizes if scaleTransform is NULL. Reuse a MPSImageLanczosScale object for frequently used scalings to avoid redundantly recreating expensive resampling state.

func (*MPSImageScale) SetScaleTransform

func (o *MPSImageScale) SetScaleTransform(scaleTransform *mpscore.MPSScaleTransform)

type MPSImageSobel

type MPSImageSobel struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagesobel

func MPSImageSobelFromID

func MPSImageSobelFromID(id objc.ID) *MPSImageSobel

func (*MPSImageSobel) ColorTransform

func (o *MPSImageSobel) ColorTransform() *float32

@property colorTransform @discussion Returns a pointer to the array of three floats used to convert RGBA, RGB or RG images to the destination format when the destination is monochrome.

func (*MPSImageSobel) InitWithCoderDevice

func (o *MPSImageSobel) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageSobel

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageSobel) InitWithDevice

func (o *MPSImageSobel) InitWithDevice(device metal.MTLDevice) *MPSImageSobel

@abstract Initialize a Sobel filter on a given device using the default color transform. Default: BT.601/JPEG {0.299f, 0.587f, 0.114f} For non-default conversion matrices, use -initWithDevice:linearGrayColorTransform: @param device The device the filter will run on @return A valid object or nil, if failure.

func (*MPSImageSobel) InitWithDeviceLinearGrayColorTransform

func (o *MPSImageSobel) InitWithDeviceLinearGrayColorTransform(device metal.MTLDevice, transform *float32) *MPSImageSobel

@abstract Initialize a Sobel filter on a given device with a non-default color transform @param device The device the filter will run on @param transform Array of three floats describing the rgb to gray scale color transform. @code Luminance = transform[0] * pixel.x + transform[1] * pixel.y + transform[2] * pixel.z; @endcode @return A valid object or nil, if failure.

type MPSImageStatisticsMean

type MPSImageStatisticsMean struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagestatisticsmean

func MPSImageStatisticsMeanFromID

func MPSImageStatisticsMeanFromID(id objc.ID) *MPSImageStatisticsMean

func (*MPSImageStatisticsMean) ClipRectSource

func (o *MPSImageStatisticsMean) ClipRectSource() metal.MTLRegion

@property clipRectSource @abstract The source rectangle to use when reading data. @discussion A MTLRegion that indicates which part of the source to read. If the clipRectSource does not lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces the MPSUnaryImageKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture. The clipRect specified in MPSUnaryImageKernel is used to control the origin in the destination texture where the mean value is written.

func (*MPSImageStatisticsMean) InitWithCoderDevice

func (o *MPSImageStatisticsMean) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageStatisticsMean

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageStatisticsMean) InitWithDevice

func (o *MPSImageStatisticsMean) InitWithDevice(device metal.MTLDevice) *MPSImageStatisticsMean

func (*MPSImageStatisticsMean) SetClipRectSource

func (o *MPSImageStatisticsMean) SetClipRectSource(clipRectSource metal.MTLRegion)

type MPSImageStatisticsMeanAndVariance

type MPSImageStatisticsMeanAndVariance struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagestatisticsmeanandvariance

func MPSImageStatisticsMeanAndVarianceFromID

func MPSImageStatisticsMeanAndVarianceFromID(id objc.ID) *MPSImageStatisticsMeanAndVariance

func (*MPSImageStatisticsMeanAndVariance) ClipRectSource

@property clipRectSource @abstract The source rectangle to use when reading data. @discussion A MTLRegion that indicates which part of the source to read. If the clipRectSource does not lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces the MPSUnaryImageKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture. The clipRect specified in MPSUnaryImageKernel is used to control the origin in the destination texture where the mean value is written.

func (*MPSImageStatisticsMeanAndVariance) InitWithCoderDevice

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageStatisticsMeanAndVariance) InitWithDevice

func (*MPSImageStatisticsMeanAndVariance) SetClipRectSource

func (o *MPSImageStatisticsMeanAndVariance) SetClipRectSource(clipRectSource metal.MTLRegion)

type MPSImageStatisticsMinAndMax

type MPSImageStatisticsMinAndMax struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagestatisticsminandmax

func MPSImageStatisticsMinAndMaxFromID

func MPSImageStatisticsMinAndMaxFromID(id objc.ID) *MPSImageStatisticsMinAndMax

func (*MPSImageStatisticsMinAndMax) ClipRectSource

func (o *MPSImageStatisticsMinAndMax) ClipRectSource() metal.MTLRegion

@property clipRectSource @abstract The source rectangle to use when reading data. @discussion A MTLRegion that indicates which part of the source to read. If the clipRectSource does not lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces the MPSUnaryImageKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture. The clipRect specified in MPSUnaryImageKernel is used to control the origin in the destination texture where the min, max values are written. The clipRect.width must be >=2. The clipRect.height must be >= 1.

func (*MPSImageStatisticsMinAndMax) InitWithCoderDevice

func (o *MPSImageStatisticsMinAndMax) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageStatisticsMinAndMax

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageStatisticsMinAndMax) InitWithDevice

func (*MPSImageStatisticsMinAndMax) SetClipRectSource

func (o *MPSImageStatisticsMinAndMax) SetClipRectSource(clipRectSource metal.MTLRegion)

type MPSImageSubtract

type MPSImageSubtract struct {
	MPSImageArithmetic
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagesubtract

func MPSImageSubtractFromID

func MPSImageSubtractFromID(id objc.ID) *MPSImageSubtract

func (*MPSImageSubtract) InitWithDevice

func (o *MPSImageSubtract) InitWithDevice(device metal.MTLDevice) *MPSImageSubtract

@abstract Initialize the subtraction operator @param device The device the filter will run on. @return A valid MPSImageSubtract object or nil, if failure.

type MPSImageTent

type MPSImageTent struct {
	MPSImageBox
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagetent

func MPSImageTentFromID

func MPSImageTentFromID(id objc.ID) *MPSImageTent

type MPSImageThresholdBinary

type MPSImageThresholdBinary struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagethresholdbinary

func MPSImageThresholdBinaryFromID

func MPSImageThresholdBinaryFromID(id objc.ID) *MPSImageThresholdBinary

func (*MPSImageThresholdBinary) InitWithCoderDevice

func (o *MPSImageThresholdBinary) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageThresholdBinary

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageThresholdBinary) InitWithDeviceThresholdValueMaximumValueLinearGrayColorTransform

func (o *MPSImageThresholdBinary) InitWithDeviceThresholdValueMaximumValueLinearGrayColorTransform(device metal.MTLDevice, thresholdValue float32, maximumValue float32, transform *float32) *MPSImageThresholdBinary

@abstract initialize a MPSImageThresholdBinary filter @param device The device the filter will run on @param thresholdValue The threshold value to use @param maximumValue The maximum value to use @param transform This matrix is an array of 3 floats. The default if no transform is specifed is BT.601/JPEG: {0.299f, 0.587f, 0.114f};

func (*MPSImageThresholdBinary) MaximumValue

func (o *MPSImageThresholdBinary) MaximumValue() float32

@property maximumValue @discussion The maximum value used to init the threshold filter

func (*MPSImageThresholdBinary) ThresholdValue

func (o *MPSImageThresholdBinary) ThresholdValue() float32

@property thresholdValue @discussion The threshold value used to init the threshold filter

func (*MPSImageThresholdBinary) Transform

func (o *MPSImageThresholdBinary) Transform() *float32

@property transform @discussion The color transform used to init the threshold filter

type MPSImageThresholdBinaryInverse

type MPSImageThresholdBinaryInverse struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagethresholdbinaryinverse

func MPSImageThresholdBinaryInverseFromID

func MPSImageThresholdBinaryInverseFromID(id objc.ID) *MPSImageThresholdBinaryInverse

func (*MPSImageThresholdBinaryInverse) InitWithCoderDevice

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageThresholdBinaryInverse) InitWithDeviceThresholdValueMaximumValueLinearGrayColorTransform

func (o *MPSImageThresholdBinaryInverse) InitWithDeviceThresholdValueMaximumValueLinearGrayColorTransform(device metal.MTLDevice, thresholdValue float32, maximumValue float32, transform *float32) *MPSImageThresholdBinaryInverse

@abstract initialize a MPSImageThresholdBinaryInverse filter @param device The device the filter will run on @param thresholdValue The threshold value to use @param maximumValue The maximum value to use @param transform This matrix is an array of 3 floats. The default if no transform is specifed is BT.601/JPEG: {0.299f, 0.587f, 0.114f};

func (*MPSImageThresholdBinaryInverse) MaximumValue

func (o *MPSImageThresholdBinaryInverse) MaximumValue() float32

@property maximumValue @discussion The maximum value used to init the threshold filter

func (*MPSImageThresholdBinaryInverse) ThresholdValue

func (o *MPSImageThresholdBinaryInverse) ThresholdValue() float32

@property thresholdValue @discussion The threshold value used to init the threshold filter

func (*MPSImageThresholdBinaryInverse) Transform

func (o *MPSImageThresholdBinaryInverse) Transform() *float32

@property transform @discussion The color transform used to init the threshold filter

type MPSImageThresholdToZero

type MPSImageThresholdToZero struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagethresholdtozero

func MPSImageThresholdToZeroFromID

func MPSImageThresholdToZeroFromID(id objc.ID) *MPSImageThresholdToZero

func (*MPSImageThresholdToZero) InitWithCoderDevice

func (o *MPSImageThresholdToZero) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageThresholdToZero

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageThresholdToZero) InitWithDeviceThresholdValueLinearGrayColorTransform

func (o *MPSImageThresholdToZero) InitWithDeviceThresholdValueLinearGrayColorTransform(device metal.MTLDevice, thresholdValue float32, transform *float32) *MPSImageThresholdToZero

@abstract initialize a MPSImageThresholdToZero filter @param device The device the filter will run on @param thresholdValue The threshold value to use @param transform This matrix is an array of 3 floats. The default if no transform is specifed is BT.601/JPEG: {0.299f, 0.587f, 0.114f};

func (*MPSImageThresholdToZero) ThresholdValue

func (o *MPSImageThresholdToZero) ThresholdValue() float32

@property thresholdValue @discussion The threshold value used to init the threshold filter

func (*MPSImageThresholdToZero) Transform

func (o *MPSImageThresholdToZero) Transform() *float32

@property transform @discussion The color transform used to init the threshold filter

type MPSImageThresholdToZeroInverse

type MPSImageThresholdToZeroInverse struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagethresholdtozeroinverse

func MPSImageThresholdToZeroInverseFromID

func MPSImageThresholdToZeroInverseFromID(id objc.ID) *MPSImageThresholdToZeroInverse

func (*MPSImageThresholdToZeroInverse) InitWithCoderDevice

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageThresholdToZeroInverse) InitWithDeviceThresholdValueLinearGrayColorTransform

func (o *MPSImageThresholdToZeroInverse) InitWithDeviceThresholdValueLinearGrayColorTransform(device metal.MTLDevice, thresholdValue float32, transform *float32) *MPSImageThresholdToZeroInverse

@abstract initialize a MPSImageThresholdToZeroInverse filter @param device The device the filter will run on @param thresholdValue The threshold value to use @param transform This matrix is an array of 3 floats. The default if no transform is specifed is BT.601/JPEG: {0.299f, 0.587f, 0.114f};

func (*MPSImageThresholdToZeroInverse) ThresholdValue

func (o *MPSImageThresholdToZeroInverse) ThresholdValue() float32

@property thresholdValue @discussion The threshold value used to init the threshold filter

func (*MPSImageThresholdToZeroInverse) Transform

func (o *MPSImageThresholdToZeroInverse) Transform() *float32

@property transform @discussion The color transform used to init the threshold filter

type MPSImageThresholdTruncate

type MPSImageThresholdTruncate struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagethresholdtruncate

func MPSImageThresholdTruncateFromID

func MPSImageThresholdTruncateFromID(id objc.ID) *MPSImageThresholdTruncate

func (*MPSImageThresholdTruncate) InitWithCoderDevice

func (o *MPSImageThresholdTruncate) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSImageThresholdTruncate

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSImageThresholdTruncate) InitWithDeviceThresholdValueLinearGrayColorTransform

func (o *MPSImageThresholdTruncate) InitWithDeviceThresholdValueLinearGrayColorTransform(device metal.MTLDevice, thresholdValue float32, transform *float32) *MPSImageThresholdTruncate

@abstract initialize a MPSImageThresholdTruncate filter @param device The device the filter will run on @param thresholdValue The threshold value to use @param transform This matrix is an array of 3 floats. The default if no transform is specifed is BT.601/JPEG: {0.299f, 0.587f, 0.114f};

func (*MPSImageThresholdTruncate) ThresholdValue

func (o *MPSImageThresholdTruncate) ThresholdValue() float32

@property thresholdValue @discussion The threshold value used to init the threshold filter

func (*MPSImageThresholdTruncate) Transform

func (o *MPSImageThresholdTruncate) Transform() *float32

@property transform @discussion The color transform used to init the threshold filter

type MPSImageTranspose

type MPSImageTranspose struct {
	MPSUnaryImageKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsimagetranspose

func MPSImageTransposeFromID

func MPSImageTransposeFromID(id objc.ID) *MPSImageTranspose

type MPSImageType

type MPSImageType int64
const (
	MPSImageType2d                    MPSImageType = 0
	MPSImageType2d_array              MPSImageType = 1
	MPSImageTypeArray2d               MPSImageType = 2
	MPSImageTypeArray2d_array         MPSImageType = 3
	MPSImageType_ArrayMask            MPSImageType = 1
	MPSImageType_BatchMask            MPSImageType = 2
	MPSImageType_typeMask             MPSImageType = 3
	MPSImageType_noAlpha              MPSImageType = 4
	MPSImageType_texelFormatMask      MPSImageType = 56
	MPSImageType_texelFormatShift     MPSImageType = 3
	MPSImageType_texelFormatStandard  MPSImageType = 0
	MPSImageType_texelFormatUnorm8    MPSImageType = 8
	MPSImageType_texelFormatFloat16   MPSImageType = 16
	MPSImageType_texelFormatBFloat16  MPSImageType = 24
	MPSImageType_bitCount             MPSImageType = 6
	MPSImageType_mask                 MPSImageType = 63
	MPSImageType2d_noAlpha            MPSImageType = 4
	MPSImageType2d_array_noAlpha      MPSImageType = 5
	MPSImageTypeArray2d_noAlpha       MPSImageType = 6
	MPSImageTypeArray2d_array_noAlpha MPSImageType = 7
)

func (MPSImageType) String

func (e MPSImageType) String() string

type MPSMatrixCopyToImage

type MPSMatrixCopyToImage struct {
	mpscore.MPSKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsmatrixcopytoimage

func MPSMatrixCopyToImageFromID

func MPSMatrixCopyToImageFromID(id objc.ID) *MPSMatrixCopyToImage

func (*MPSMatrixCopyToImage) DataLayout

func (o *MPSMatrixCopyToImage) DataLayout() mpscore.MPSDataLayout

@property dataLayout @abstract The data layout to use @discussion Returns the data layout. When copying from a MPSMatrix to a MPSImage, this describes the order in which the image values are to be stored in the buffer associated with the MPSMatrix. Default: MPSDataLayoutFeatureChannelsxHeightxWidth

func (*MPSMatrixCopyToImage) EncodeBatchToCommandBufferSourceMatrixDestinationImages

func (o *MPSMatrixCopyToImage) EncodeBatchToCommandBufferSourceMatrixDestinationImages(commandBuffer metal.MTLCommandBuffer, sourceMatrix *mpscore.MPSMatrix, destinationImages unsafe.Pointer)

@abstract Encode a kernel that copies a MPSMatrix to a MPSImageBatch into a command buffer using a MTLComputeCommandEncoder. @discussion The kernel copies feature channels from sourceImage to the buffer associated with destinationMatrix. The kernel will not begin to execute until after the command buffer has been enqueued and committed. Each image will be copied to its own row in the matrix, starting with row destinationMatrixOrigin.x. NOTE: The destinationMatrix.dataType must match the feature channel data type in sourceImage. NOTE: All the images in the source batch should be of the same size and have numberOfImages = 1. @param commandBuffer A valid MTLCommandBuffer. @param sourceMatrix A valid MPSMatrix or MPSTemporaryMatrix object describing the source matrix. @param destinationImages A valid MPSImageBatch describing the images to copy to.

func (*MPSMatrixCopyToImage) EncodeToCommandBufferSourceMatrixDestinationImage

func (o *MPSMatrixCopyToImage) EncodeToCommandBufferSourceMatrixDestinationImage(commandBuffer metal.MTLCommandBuffer, sourceMatrix *mpscore.MPSMatrix, destinationImage *mpscore.MPSImage)

@abstract Encode a kernel that copies a MPSMatrix to a MPSImage into a command buffer using a MTLComputeCommandEncoder. @discussion The kernel copies feature channels from sourceMatrix to the destinationImage. The kernel will not begin to execute until after the command buffer has been enqueued and committed. NOTE: The sourceMatrix.dataType must match the feature channel data type in destinationImage. @param commandBuffer A valid MTLCommandBuffer. @param sourceMatrix A valid MPSMatrix or MPSTemporaryMatrix object describing the source matrix. @param destinationImage A valid MPSImage describing the image to copy to.

func (*MPSMatrixCopyToImage) InitWithCoderDevice

func (o *MPSMatrixCopyToImage) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSMatrixCopyToImage

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSMatrixCopyToImage) InitWithDeviceDataLayout

func (o *MPSMatrixCopyToImage) InitWithDeviceDataLayout(device metal.MTLDevice, dataLayout mpscore.MPSDataLayout) *MPSMatrixCopyToImage

@abstract Initialize a MPSMatrixCopyToImage object on a device @param device The device the kernel will run on @param dataLayout The data layout @return A valid MPSMatrixCopyToImage object or nil, if failure.

func (*MPSMatrixCopyToImage) SetSourceMatrixBatchIndex

func (o *MPSMatrixCopyToImage) SetSourceMatrixBatchIndex(sourceMatrixBatchIndex uint)

func (*MPSMatrixCopyToImage) SetSourceMatrixOrigin

func (o *MPSMatrixCopyToImage) SetSourceMatrixOrigin(sourceMatrixOrigin metal.MTLOrigin)

func (*MPSMatrixCopyToImage) SourceMatrixBatchIndex

func (o *MPSMatrixCopyToImage) SourceMatrixBatchIndex() uint

@property sourceMatrixBatchIndex @discussion The index of the source matrix in the batch. This property is modifiable and defaults to 0 at initialization time.

func (*MPSMatrixCopyToImage) SourceMatrixOrigin

func (o *MPSMatrixCopyToImage) SourceMatrixOrigin() metal.MTLOrigin

@property sourceMatrixOrigin @discussion The origin, relative to [0, 0] in the source matrix. This property is modifiable and defaults to [0, 0] at initialization time. If a different origin is desired then this should be modified prior to encoding the kernel. The z value must be 0.

type MPSUnaryImageKernel

type MPSUnaryImageKernel struct {
	mpscore.MPSKernel
}

Apple documentation: https://developer.apple.com/documentation/mpsimage/mpsunaryimagekernel

func MPSUnaryImageKernelFromID

func MPSUnaryImageKernelFromID(id objc.ID) *MPSUnaryImageKernel

func (*MPSUnaryImageKernel) ClipRect

func (o *MPSUnaryImageKernel) ClipRect() metal.MTLRegion

@property clipRect @abstract An optional clip rectangle to use when writing data. Only the pixels in the rectangle will be overwritten. @discussion A MTLRegion that indicates which part of the destination to overwrite. If the clipRect does not lie completely within the destination image, the intersection between clip rectangle and destination bounds is used. Default: MPSRectNoClip (MPSKernel::MPSRectNoClip) indicating the entire image. See Also: @ref MetalPerformanceShaders.h subsubsection_clipRect

func (*MPSUnaryImageKernel) EdgeMode

@property edgeMode @abstract The MPSImageEdgeMode to use when texture reads stray off the edge of an image @discussion Most MPSKernel objects can read off the edge of the source image. This can happen because of a negative offset property, because the offset + clipRect.size is larger than the source image or because the filter looks at neighboring pixels, such as a Convolution or morphology filter. Default: usually MPSImageEdgeModeZero. (Some MPSKernel types default to MPSImageEdgeModeClamp, because MPSImageEdgeModeZero is either not supported or would produce unexpected results.) See Also: @ref MetalPerformanceShaders.h subsubsection_edgemode

func (*MPSUnaryImageKernel) EncodeToCommandBufferInPlaceTextureFallbackCopyAllocator

func (o *MPSUnaryImageKernel) EncodeToCommandBufferInPlaceTextureFallbackCopyAllocator(commandBuffer metal.MTLCommandBuffer, texture metal.MTLTexture, copyAllocator func() unsafe.Pointer) bool

This method attempts to apply the MPSKernel in place on a texture. In-place operation means that the same texture is used both to hold the input image and the results. Operating in-place can be an excellent way to reduce resource utilization, and save time and energy. While simple Metal kernels can not operate in place because textures can not be readable and writable at the same time, some MPSKernels can operate in place because they use multi-pass algorithms. Whether a MPSKernel can operate in-place can depend on current hardware, operating system revision and the parameters and properties passed to it. You should never assume that a MPSKernel will continue to work in place, even if you have observed it doing so before. If the operation succeeds in-place, YES is returned. If the in-place operation fails and no copyAllocator is provided, then NO is returned. Without a fallback MPSCopyAllocator, in neither case is the pointer held at *texture modified. Failure during in-place operation is very common and will occur inconsistently across different hardware platforms and OS releases. Without a fallback MPSCopyAllocator, operating in place may require significant error handling code to accompany each call to -encodeToCommandBuffer:..., complicating your code. You may find it simplifies your code to provide a fallback MPSCopyAllocator so that the operation can proceed reliably even when it can not proceed in-place. When an in-place filter fails, the MPSCopyAllocator (if any) will be invoked to create a new texture in which to write the results, allowing the filter to proceed reliably out-of-place. The original texture will be released, replaced with a pointer to the new texture and YES will be returned. If the allocator returns an invalid texture, it is released, *texture remains unmodified and NO is returned. Please see the MPSCopyAllocator definition for a sample allocator implementation. Sample usage with a copy allocator: @code id <MTLTexture> inPlaceTex = ...; MPSImageSobel *sobelFiler = [[MPSImageSobel alloc] initWithDevice: myDevice]; // With a fallback MPSCopyAllocator, failure should only occur in exceptional // conditions such as MTLTexture allocation failure or programmer error. // That is, the operation is roughly as robust as the MPSCopyAllocator. // Depending on the quality of that, we might decide we are justified here // in not checking the return value. [sobelFilter encodeToCommandBuffer: myCommandBuffer inPlaceTexture: &inPlaceTex // may be replaced! fallbackCopyAllocator: myAllocator]; // If myAllocator was not called: // // inPlaceTex holds the original texture with the result pixels in it // // else, // // 1) myAllocator creates a new texture. // 2) The new texture pixel data is overwritten by MPSUnaryImageKernel. // 3) The old texture passed in *inPlaceTex is released once. // 4) *inPlaceTex = the new texture // // In either case, the caller should now hold one reference to the texture now held in // inPlaceTex, whether it was replaced or not. Most of the time that means that nothing // further needs to be done here, and you can proceed to the next image encoding operation. // However, if other agents held references to the original texture, they still hold them // and may need to be alerted that the texture has been replaced so that they can retain // the new texture and release the old one. [sobelFilter release]; // if not ARC, clean up the MPSImageSobel object @endcode Note: Image filters that look at neighboring pixel values may actually consume more memory when operating in place than out of place. Many such operations are tiled internally to save intermediate texture storage, but can not tile when operating in place. The memory savings for tiling is however very short term, typically the lifetime of the MTLCommandBuffer. @abstract Attempt to apply a MPSKernel to a texture in place. @param commandBuffer A valid MTLCommandBuffer to receive the encoded filter @param texture A pointer to a valid MTLTexture containing source image. On success, the image contents and possibly texture itself will be replaced with the result image. @param copyAllocator An optional block to allocate a new texture to hold the results, in case in-place operation is not possible. The allocator may use a different MTLPixelFormat or size than the original texture. You may enqueue operations on the provided MTLCommandBuffer using the provided MTLComputeCommandEncoder to initialize the texture contents. @return On success, YES is returned. The texture may have been replaced with a new texture if a copyAllocator was provided. On failure, NO is returned. The texture is unmodified.

func (*MPSUnaryImageKernel) EncodeToCommandBufferSourceImageDestinationImage

func (o *MPSUnaryImageKernel) EncodeToCommandBufferSourceImageDestinationImage(commandBuffer metal.MTLCommandBuffer, sourceImage *mpscore.MPSImage, destinationImage *mpscore.MPSImage)

@abstract Encode a MPSKernel into a command Buffer. The operation shall proceed out-of-place. @param commandBuffer A valid MTLCommandBuffer to receive the encoded filter @param sourceImage A valid MPSImage containing the source image. @param destinationImage A valid MPSImage to be overwritten by result image. DestinationImage may not alias sourceImage.

func (*MPSUnaryImageKernel) EncodeToCommandBufferSourceTextureDestinationTexture

func (o *MPSUnaryImageKernel) EncodeToCommandBufferSourceTextureDestinationTexture(commandBuffer metal.MTLCommandBuffer, sourceTexture metal.MTLTexture, destinationTexture metal.MTLTexture)

@abstract Encode a MPSKernel into a command Buffer. The operation shall proceed out-of-place. @param commandBuffer A valid MTLCommandBuffer to receive the encoded filter @param sourceTexture A valid MTLTexture containing the source image. @param destinationTexture A valid MTLTexture to be overwritten by result image. DestinationTexture may not alias sourceTexture.

func (*MPSUnaryImageKernel) InitWithCoderDevice

func (o *MPSUnaryImageKernel) InitWithCoderDevice(aDecoder *foundation.NSCoder, device metal.MTLDevice) *MPSUnaryImageKernel

@abstract NSSecureCoding compatability @discussion While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. @param aDecoder The NSCoder subclass with your serialized MPSKernel @param device The MTLDevice on which to make the MPSKernel @return A new MPSKernel object, or nil if failure.

func (*MPSUnaryImageKernel) InitWithDevice

func (o *MPSUnaryImageKernel) InitWithDevice(device metal.MTLDevice) *MPSUnaryImageKernel

@abstract Standard init with default properties per filter type @param device The device that the filter will be used on. May not be NULL. @result a pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later.

func (*MPSUnaryImageKernel) Offset

@property offset @abstract The position of the destination clip rectangle origin relative to the source buffer. @discussion The offset is defined to be the position of clipRect.origin in source coordinates. Default: {0,0,0}, indicating that the top left corners of the clipRect and source image align. See Also: @ref MetalPerformanceShaders.h subsubsection_mpsoffset

func (*MPSUnaryImageKernel) SetClipRect

func (o *MPSUnaryImageKernel) SetClipRect(clipRect metal.MTLRegion)

func (*MPSUnaryImageKernel) SetEdgeMode

func (o *MPSUnaryImageKernel) SetEdgeMode(edgeMode mpscore.MPSImageEdgeMode)

func (*MPSUnaryImageKernel) SetOffset

func (o *MPSUnaryImageKernel) SetOffset(offset mpscore.MPSOffset)

func (*MPSUnaryImageKernel) SourceRegionForDestinationSize

func (o *MPSUnaryImageKernel) SourceRegionForDestinationSize(destinationSize metal.MTLSize) mpscore.MPSRegion

sourceRegionForDestinationSize: is used to determine which region of the sourceTexture will be read by encodeToCommandBuffer:sourceTexture:destinationTexture (and similar) when the filter runs. This information may be needed if the source image is broken into multiple textures. The size of the full (untiled) destination image is provided. The region of the full (untiled) source image that will be read is returned. You can then piece together an appropriate texture containing that information for use in your tiled context. The function will consult the MPSUnaryImageKernel offset and clipRect parameters, to determine the full region read by the function. Other parameters such as sourceClipRect, kernelHeight and kernelWidth will be consulted as necessary. All properties should be set to intended values prior to calling sourceRegionForDestinationSize:. Caution: This function operates using global image coordinates, but -encodeToCommandBuffer:... uses coordinates local to the source and destination image textures. Consequently, the offset and clipRect attached to this object will need to be updated using a global to local coordinate transform before -encodeToCommandBuffer:... is called. @abstract Determine the region of the source texture that will be read for a encode operation @param destinationSize The size of the full virtual destination image. @return The area in the virtual source image that will be read.

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

type Xpc_listener_create_flags_t

type Xpc_listener_create_flags_t int64
const (
	XPC_LISTENER_CREATE_NONE             Xpc_listener_create_flags_t = 0
	XPC_LISTENER_CREATE_INACTIVE         Xpc_listener_create_flags_t = 1
	XPC_LISTENER_CREATE_FORCE_MACH       Xpc_listener_create_flags_t = 2
	XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4
)

func (Xpc_listener_create_flags_t) String

type Xpc_session_create_flags_t

type Xpc_session_create_flags_t int64
const (
	XPC_SESSION_CREATE_NONE            Xpc_session_create_flags_t = 0
	XPC_SESSION_CREATE_INACTIVE        Xpc_session_create_flags_t = 1
	XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2
)

func (Xpc_session_create_flags_t) String

Jump to

Keyboard shortcuts

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