Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit d7eff12

Browse files
Shashi456rxwei
authored andcommitted
Replace tabs with spaces in TensorHandle.swift. (#167)
1 parent 20d1b45 commit d7eff12

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Sources/TensorFlow/Core/TensorHandle.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ extension _AnyTensorHandle {
3434
/// Class wrapping a C pointer to a TensorHandle. This class owns the
3535
/// TensorHandle and is responsible for destroying it.
3636
public class TFETensorHandle: _AnyTensorHandle {
37-
public let _cTensorHandle: CTensorHandle
37+
public let _cTensorHandle: CTensorHandle
3838

3939
public var _tfeTensorHandle: TFETensorHandle { return self }
4040

4141
public init(_owning base: CTensorHandle) {
42-
self._cTensorHandle = base
43-
}
42+
self._cTensorHandle = base
43+
}
4444

4545
deinit {
46-
debugLog("De-initializing TensorHandle.")
47-
TFE_DeleteTensorHandle(_cTensorHandle)
48-
debugLog("Returning from deinit of TensorHandle.")
49-
}
46+
debugLog("De-initializing TensorHandle.")
47+
TFE_DeleteTensorHandle(_cTensorHandle)
48+
debugLog("Returning from deinit of TensorHandle.")
49+
}
5050
}
5151

5252

@@ -55,8 +55,8 @@ public class TFETensorHandle: _AnyTensorHandle {
5555
/// they are extracted into a tensor program.
5656
public struct TensorHandle<Scalar> where Scalar: _TensorFlowDataTypeCompatible {
5757
let handle: _AnyTensorHandle
58-
59-
public var _cTensorHandle: CTensorHandle { handle._cTensorHandle }
58+
59+
public var _cTensorHandle: CTensorHandle { handle._cTensorHandle }
6060

6161
public init(_owning cTensorHandle: CTensorHandle) {
6262
self.handle = TFETensorHandle(_owning: cTensorHandle)
@@ -105,7 +105,7 @@ public struct TensorHandle<Scalar> where Scalar: _TensorFlowDataTypeCompatible {
105105
extension TensorHandle where Scalar: TensorFlowScalar {
106106
/// Create a `TensorHandle` with a closure that initializes the underlying buffer.
107107
///
108-
/// `scalarsInitializer` receives a buffer with exactly enough capacity to hold the scalars in a
108+
/// `scalarsInitializer` receives a buffer with exactly enough capacity to hold the scalars in a
109109
/// tensor with shape `shape`. `scalarsInitializer` must initialize the entire buffer, with
110110
/// contiguous scalars in row-major order.
111111
@inlinable
@@ -123,7 +123,7 @@ extension TensorHandle where Scalar: TensorFlowScalar {
123123
}
124124

125125
internal extension TensorHandle {
126-
/// Create a `ShapedArray` with contents of the underlying `TensorHandle`. If the `TensorHandle`
126+
/// Create a `ShapedArray` with contents of the underlying `TensorHandle`. If the `TensorHandle`
127127
/// is on the accelerator, it will be copied to the host.
128128
/// - Returns: A `ShapedArray`.
129129
@usableFromInline
@@ -140,7 +140,7 @@ public struct ResourceHandle {
140140

141141
@usableFromInline
142142
var _cTensorHandle: CTensorHandle { handle._cTensorHandle }
143-
143+
144144
@usableFromInline
145145
init(owning cTensorHandle: CTensorHandle) {
146146
self.handle = TFETensorHandle(_owning: cTensorHandle)
@@ -152,7 +152,7 @@ public struct VariantHandle {
152152

153153
@usableFromInline
154154
var _cTensorHandle: CTensorHandle { handle._cTensorHandle }
155-
155+
156156
@usableFromInline
157157
init(owning cTensorHandle: CTensorHandle) {
158158
self.handle = TFETensorHandle(_owning: cTensorHandle)

0 commit comments

Comments
 (0)