Skip to content

Commit 7a275ed

Browse files
authored
Mark native Swift extension public
1 parent f24094e commit 7a275ed

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

extension/apple/ExecuTorch/Exported/ExecuTorch+Tensor.swift

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,40 @@
1111
/// A protocol that types conform to in order to be used as tensor element types.
1212
/// Provides the mapping from the Swift type to the underlying `DataType`.
1313
@available(*, deprecated, message: "This API is experimental.")
14-
protocol Scalar {
14+
public protocol Scalar {
1515
/// The `DataType` corresponding to this scalar type.
1616
static var dataType: DataType { get }
1717
}
1818

1919
@available(*, deprecated, message: "This API is experimental.")
20-
extension UInt8: Scalar { static var dataType: DataType { .byte } }
20+
public extension UInt8: Scalar { static var dataType: DataType { .byte } }
2121
@available(*, deprecated, message: "This API is experimental.")
22-
extension Int8: Scalar { static var dataType: DataType { .char } }
22+
public extension Int8: Scalar { static var dataType: DataType { .char } }
2323
@available(*, deprecated, message: "This API is experimental.")
24-
extension Int16: Scalar { static var dataType: DataType { .short } }
24+
public extension Int16: Scalar { static var dataType: DataType { .short } }
2525
@available(*, deprecated, message: "This API is experimental.")
26-
extension Int32: Scalar { static var dataType: DataType { .int } }
26+
public extension Int32: Scalar { static var dataType: DataType { .int } }
2727
@available(*, deprecated, message: "This API is experimental.")
28-
extension Int64: Scalar { static var dataType: DataType { .long } }
28+
public extension Int64: Scalar { static var dataType: DataType { .long } }
2929
@available(*, deprecated, message: "This API is experimental.")
30-
extension Int: Scalar { static var dataType: DataType { .long } }
31-
@available(macOS 11.0, *)
30+
public extension Int: Scalar { static var dataType: DataType { .long } }
3231
@available(*, deprecated, message: "This API is experimental.")
33-
extension Float16: Scalar { static var dataType: DataType { .half } }
32+
public extension Float: Scalar { static var dataType: DataType { .float } }
3433
@available(*, deprecated, message: "This API is experimental.")
35-
extension Float: Scalar { static var dataType: DataType { .float } }
34+
public extension Double: Scalar { static var dataType: DataType { .double } }
3635
@available(*, deprecated, message: "This API is experimental.")
37-
extension Double: Scalar { static var dataType: DataType { .double } }
36+
public extension Bool: Scalar { static var dataType: DataType { .bool } }
3837
@available(*, deprecated, message: "This API is experimental.")
39-
extension Bool: Scalar { static var dataType: DataType { .bool } }
38+
public extension UInt16: Scalar { static var dataType: DataType { .uInt16 } }
4039
@available(*, deprecated, message: "This API is experimental.")
41-
extension UInt16: Scalar { static var dataType: DataType { .uInt16 } }
40+
public extension UInt32: Scalar { static var dataType: DataType { .uInt32 } }
4241
@available(*, deprecated, message: "This API is experimental.")
43-
extension UInt32: Scalar { static var dataType: DataType { .uInt32 } }
42+
public extension UInt64: Scalar { static var dataType: DataType { .uInt64 } }
4443
@available(*, deprecated, message: "This API is experimental.")
45-
extension UInt64: Scalar { static var dataType: DataType { .uInt64 } }
46-
@available(*, deprecated, message: "This API is experimental.")
47-
extension UInt: Scalar { static var dataType: DataType { .uInt64 } }
44+
public extension UInt: Scalar { static var dataType: DataType { .uInt64 } }
4845

4946
@available(*, deprecated, message: "This API is experimental.")
50-
extension Tensor {
47+
public extension Tensor {
5148
/// Calls the closure with a typed, immutable buffer pointer over the tensor’s elements.
5249
///
5350
/// - Parameter body: A closure that receives an `UnsafeBufferPointer<T>` bound to the tensor’s data.

0 commit comments

Comments
 (0)