Class

MTLArrayType

A description of an array.

Declaration

class MTLArrayType : MTLType

Overview

A MTLArrayType object provides details about an array parameter. Don't create MTLArrayType objects directly; other reflection objects contain properties to determine if a parameter is an array and to obtain the MTLArrayType object that describes the array.

Topics

Describing the Array Elements

var arrayLength: Int

The number of elements in the array.

var elementType: MTLDataType

The data type of the array’s elements.

var stride: Int

The stride between array elements, in bytes.

var argumentIndexStride: Int

The stride, in bytes, between argument indices.

Obtaining Details for Complex Array Elements

func element() -> MTLArrayType?

Provides a description of the underlying type when an array holds other arrays as its elements.

func elementStructType() -> MTLStructType?

Provides a description of the underlying struct type when an array holds structs as its elements.

func elementPointerType() -> MTLPointerType?

Provides a description of the underlying pointer type when an array holds pointers as its elements.

func elementTextureReferenceType() -> MTLTextureReferenceType?

Provides a description of the underlying texture type when an array holds textures as its elements.

Relationships

Inherits From

Conforms To

See Also

Function Argument Information

struct MTLPipelineOption

The compilation options that determine which argument information to provide.

class MTLComputePipelineReflection

Information about the arguments of a compute function.

class MTLRenderPipelineReflection

Information about the arguments of a graphics function.

class MTLArgument

Information about an argument of a graphics or compute function.

class MTLType

A description of a data type.

class MTLStructType

A description of a structure.

class MTLPointerType

A description of a pointer.

class MTLTextureReferenceType

A description of a texture.

enum MTLDataType

Data types for function arguments.

enum MTLArgumentType

The resource type associated with an argument of a function.

enum MTLArgumentAccess

Function access restrictions to argument data in the shading language code.