allocate(initializingFrom:shape:stride:)
Creates a BNNSTensor populated with a copy of the values in source.
Declaration
static func allocate<C>(initializingFrom source: C, shape: [Int], stride: [Int]) -> BNNSTensor where C : AccelerateBuffer, C.Element : BNNSScalarParameters
- source:
The collection that provides the source elements.
- shape:
The shape of the tensor.
- stride:
The stride of the tensor.