Instance Method

initialize(repeating:)

Initializes every element in this buffer’s memory to a copy of the given value.

Declaration

func initialize(repeating repeatedValue: Element)

Parameters

repeatedValue

The instance to initialize this buffer’s memory with.

Discussion

The destination memory must be uninitialized or the buffer’s Element must be a trivial type. After a call to initialize(repeating:), the entire region of memory referenced by this buffer is initialized.