Protocol

SIMDStorage

A type that can function as storage for a SIMD vector type.

Declaration

protocol SIMDStorage

Overview

The SIMDStorage protocol defines a storage layout and provides elementwise accesses. Computational operations are defined on the SIMD protocol, which refines this protocol, and on the concrete types that conform to SIMD.

Topics

Associated Types

associatedtype Scalar

The type of scalars in the vector space.

Required.

Initializers

init()

Creates a vector with zero in all lanes.

Required.

Instance Properties

var scalarCount: Int

The number of scalars, or elements, in the vector.

Required. Default implementation provided.

Subscripts

subscript(Int) -> Self.Scalar

Accesses the element at the specified index.

Required. Default implementations provided.

See Also

Supporting Types

protocol SIMD

A SIMD vector of a fixed number of elements.

protocol SIMDScalar

A type that can be used as an element in a SIMD vector.