Skip to content

Commit b42dd7c

Browse files
committed
Make ElementaryFunctions available on macOS.
Filed TF-796 with more context.
1 parent 9dc2ca1 commit b42dd7c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

stdlib/public/core/MathFunctions.swift.gyb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ import SwiftShims
3434
/// ElementaryFunctions and FloatingPoint.
3535
///
3636
/// [elfn]: http://en.wikipedia.org/wiki/Elementary_function
37-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
37+
// SWIFT_ENABLE_TENSORFLOW
38+
// NOTE(TF-796): Make `ElementaryFunctions` available on macOS.
39+
// @available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
3840
public protocol ElementaryFunctions {
3941

4042
%for func in ElementaryFunctions:
@@ -125,7 +127,9 @@ extension ${Self}: ElementaryFunctions {
125127
% end
126128
%end
127129

128-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
130+
// SWIFT_ENABLE_TENSORFLOW
131+
// NOTE(TF-796): Make `ElementaryFunctions` available on macOS.
132+
// @available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
129133
extension SIMD where Scalar: ElementaryFunctions {
130134
% for func in ElementaryFunctions:
131135

@@ -168,6 +172,8 @@ extension SIMD where Scalar: ElementaryFunctions {
168172
}
169173

170174
%for n in [2,3,4,8,16,32,64]:
171-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
175+
// SWIFT_ENABLE_TENSORFLOW
176+
// NOTE(TF-796): Make `ElementaryFunctions` available on macOS.
177+
// @available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
172178
extension SIMD${n}: ElementaryFunctions where Scalar: ElementaryFunctions { }
173179
%end

0 commit comments

Comments
 (0)