data
TypeScriptget data(): (SDKHandle) | nullSwift declarationvar data: UnsafeMutableRawPointer?struct · SDK 27.1
struct BNNSNDArrayDescriptorget data(): (SDKHandle) | nullSwift declarationvar data: UnsafeMutableRawPointer?set data(value: (SDKHandle) | null)Swift declarationvar data: UnsafeMutableRawPointer?get data_bias(): numberSwift declarationvar data_bias: Floatset data_bias(value: number)Swift declarationvar data_bias: Floatget data_scale(): numberSwift declarationvar data_scale: Floatset data_scale(value: number)Swift declarationvar data_scale: Floatget data_type(): BNNSDataTypeSwift declarationvar data_type: BNNSDataTypeset data_type(value: BNNSDataType)Swift declarationvar data_type: BNNSDataTypeget flags(): BNNSNDArrayFlagsSwift declarationvar flags: BNNSNDArrayFlagsset flags(value: BNNSNDArrayFlags)Swift declarationvar flags: BNNSNDArrayFlagsget layout(): BNNSDataLayoutSwift declarationvar layout: BNNSDataLayoutset layout(value: BNNSDataLayout)Swift declarationvar layout: BNNSDataLayoutget size(): [number, number, number, number, number, number, number, number]Swift declarationvar size: (Int, Int, Int, Int, Int, Int, Int, Int)set size(value: [number, number, number, number, number, number, number, number])Swift declarationvar size: (Int, Int, Int, Int, Int, Int, Int, Int)get stride(): [number, number, number, number, number, number, number, number]Swift declarationvar stride: (Int, Int, Int, Int, Int, Int, Int, Int)set stride(value: [number, number, number, number, number, number, number, number])Swift declarationvar stride: (Int, Int, Int, Int, Int, Int, Int, Int)get table_data(): (SDKHandle) | nullSwift declarationvar table_data: UnsafeMutableRawPointer?set table_data(value: (SDKHandle) | null)Swift declarationvar table_data: UnsafeMutableRawPointer?get table_data_type(): BNNSDataTypeSwift declarationvar table_data_type: BNNSDataTypeset table_data_type(value: BNNSDataType)Swift declarationvar table_data_type: BNNSDataTypedeallocate(): voidSwift declarationfunc deallocate()Frees any memory associated with this `BNNSNDArrayDescriptor`.
static initDataShapeBatchSize(data: Float32Array, shape: BNNS_Shape, batchSize: number): (BNNSNDArrayDescriptor) | nullSwift declarationinit?<T>(data: UnsafeMutableBufferPointer<T>, shape: BNNS.Shape, batchSize: Int) where T : BNNSScalarCreates an `BNNSNDArrayDescriptor` referencing the same memory as the specified `UnsafeMutableBufferPointer`.
static initDataShape(data: Float32Array, shape: BNNS_Shape): (BNNSNDArrayDescriptor) | nullSwift declarationinit?<T>(data: UnsafeMutableBufferPointer<T>, shape: BNNS.Shape) where T : BNNSScalarCreates an `BNNSNDArrayDescriptor` referencing the same memory as the specified `UnsafeMutableBufferPointer`.
get shape(): BNNS_ShapeSwift declarationvar shape: BNNS.Shape { get }The computed shape (layout, size, and stride) of this `BNNSNDArrayDescriptor`.
static allocateInitializingFromShapeBatchSize(source: Array<number>, shape: BNNS_Shape, batchSize?: number): BNNSNDArrayDescriptorSwift declarationstatic func allocate<C>(initializingFrom source: C, shape: BNNS.Shape, batchSize: Int = 1) -> BNNSNDArrayDescriptor where C : Collection, C.Element : BNNSScalarCreates an `BNNSNDArrayDescriptor` populated with a **copy** of the values in `source`.
static allocateRepeatingShapeBatchSize(repeatedValue: number, shape: BNNS_Shape, batchSize?: number): BNNSNDArrayDescriptorSwift declarationstatic func allocate<T>(repeating repeatedValue: T, shape: BNNS.Shape, batchSize: Int = 1) -> BNNSNDArrayDescriptor where T : BNNSScalarCreates an `BNNSNDArrayDescriptor` filled with the specified scalar value.
get dataSize(): numberSwift declarationvar dataSize: Int { get }The size, in bytes, of the array data. This value is `0` if `data` is `nil` of if BNNS is unable to determine the size of the array data. - seealso: `BNNSNDArrayGetDataSize`
static initDataTypeShape(dataType: BNNSDataType, shape: BNNS_Shape): BNNSNDArrayDescriptorSwift declarationinit(dataType: BNNSDataType, shape: BNNS.Shape)Creates a data-less `BNNSNDArrayDescriptor`
static initFlagsLayoutSizeStrideDataData_typeTable_dataTable_data_typeData_scaleData_bias(flags: BNNSNDArrayFlags, layout: BNNSDataLayout, size: [number, number, number, number, number, number, number, number], stride: [number, number, number, number, number, number, number, number], data: (SDKHandle) | null, data_type: BNNSDataType, table_data: (SDKHandle) | null, table_data_type: BNNSDataType, data_scale: number, data_bias: number): BNNSNDArrayDescriptorSwift declarationinit(flags: BNNSNDArrayFlags, layout: BNNSDataLayout, size: (Int, Int, Int, Int, Int, Int, Int, Int), stride: (Int, Int, Int, Int, Int, Int, Int, Int), data: UnsafeMutableRawPointer?, data_type: BNNSDataType, table_data: UnsafeMutableRawPointer?, table_data_type: BNNSDataType, data_scale: Float, data_bias: Float)static init(): BNNSNDArrayDescriptorSwift declarationinit()11 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
BNNSNDArrayDescriptor.allocate(randomNormalUsing:mean:standardDeviation:shape:batchSize:)
This declaration needs Swift generic type arguments. (no canonical witness for Scalar)
BNNSNDArrayDescriptor.allocate(randomUniformUsing:range:shape:batchSize:)
This declaration needs Swift generic type arguments. (no canonical witness for Scalar)
BNNSNDArrayDescriptor.allocate(randomUniformUsing:range:shape:batchSize:)
This declaration needs Swift generic type arguments. (no canonical witness for Scalar)
BNNSNDArrayDescriptor.init(data:scalarType:shape:)
Passing a Swift type itself is not supported.
BNNSNDArrayDescriptor.allocateUninitialized(scalarType:shape:batchSize:)
Passing a Swift type itself is not supported.
BNNSNDArrayDescriptor.allocate(randomIn:shape:batchSize:)
This declaration needs Swift generic type arguments. (no canonical witness for Scalar)
BNNSNDArrayDescriptor.allocate(randomIn:shape:batchSize:)
This declaration needs Swift generic type arguments. (no canonical witness for Scalar)
BNNSNDArrayDescriptor.allocate(randomIn:using:shape:batchSize:)
This declaration needs Swift generic type arguments. (no canonical witness for Scalar)
BNNSNDArrayDescriptor.allocate(randomIn:using:shape:batchSize:)
This declaration needs Swift generic type arguments. (no canonical witness for Scalar)
BNNSNDArrayDescriptor.makeArray(of:batchSize:)
Passing a Swift type itself is not supported.
BNNSNDArrayDescriptor.init(data:scalarType:shape:batchSize:)
Passing a Swift type itself is not supported.