Contents

init(initializingFrom:shape:stride:)

Returns a BNNSTensor structure that’s initialized with every element of the source.

Declaration

init<T>(initializingFrom source: some AccelerateBuffer, shape: [Int], stride: [Int]) where T : BNNSScalar

Parameters

  • source:

    A collection of elements that the function uses to initialize the tensor’s storage.

  • shape:

    The shape of the tensor.

  • stride:

    The stride of the tensor.