CPUMemoryOperators

public struct CPUMemoryOperators : MemoryOperatorsType

Undocumented

  • Undocumented

    Declaration

    Swift

    public typealias RawBuffer = UnsafeMutableRawBufferPointer
  • Undocumented

    Declaration

    Swift

    public typealias Device = CPU
  • Declaration

    Swift

    public static func allocateBuffer<Element>(withCapacity capacity: Int, type: Element.Type) -> Buffer<Element, CPU>
  • Declaration

    Swift

    public static func allocateBuffer<Element>(withShape shape: [Int], type: Element.Type) -> ShapedBuffer<Element, CPU>
  • Declaration

    Swift

    public static func free<Element>(_ buffer: Buffer<Element, CPU>)
  • Declaration

    Swift

    public static func free<Element>(_ buffer: ShapedBuffer<Element, CPU>)
  • Declaration

    Swift

    public static func assign<Element>(from source: UnsafeBufferPointer<Element>, to destination: Buffer<Element, CPU>, count: Int)
  • Declaration

    Swift

    public static func assign<Element>(from source: Buffer<Element, CPU>, to destination: Buffer<Element, CPU>, count: Int)
  • Declaration

    Swift

    public static func assign<Element>(from source: Buffer<Element, CPU>, to destination: UnsafeMutableBufferPointer<Element>, count: Int)
  • Declaration

    Swift

    @_specialize(exported: false, kind: full, where Element == Float)
    @_specialize(exported: false, kind: full, where Element == Int32)
    @_specialize(exported: false, kind: full, where Element == Double)
    @inline(__always)
    public static func get<Element>(slice: [Int?], of buffer: Buffer<Element, CPU>, with shape: [Int]) -> (Buffer<Element, CPU>, Bool, [Int])
  • Declaration

    Swift

    public static func get<Element>(slice: [(CountableRange<Int>)?], of buffer: Buffer<Element, CPU>, with shape: [Int]) -> (Buffer<Element, CPU>, Bool, [Int])
  • Declaration

    Swift

    public static func set<Element>(slice: [Int?], of buffer: Buffer<Element, CPU>, with dstShape: [Int], from source: Buffer<Element, CPU>, with sourceShape: [Int])
  • Declaration

    Swift

    public static func set<Element>(slice: [Range<Int>?], of buffer: Buffer<Element, CPU>, with dstShape: [Int], from source: Buffer<Element, CPU>, with sourceShape: [Int])
  • Declaration

    Swift

    public static func getValue<Element>(from source: Buffer<Element, CPU>) -> Element
  • Declaration

    Swift

    public static func getSize<Element>(of buffer: Buffer<Element, CPU>) -> Int
  • Declaration

    Swift

    public static func advance<Element>(buffer: Buffer<Element, CPU>, by advancement: Int) -> Buffer<Element, CPU>
  • Declaration

    Swift

    public static func setPointee<Element>(of buffer: Buffer<Element, CPU>, to newValue: Element)