Almost all operations are returning copies of tensors and have in-place counterpart. If main operation name is operationName, then mutating operation is named operationName$. Usually in-place counterparts have return type Void.
General operations
[x] transpose(dim1:Int, dim2: Int) transpose along dimension
Implement basic tensor operations.
Almost all operations are returning copies of tensors and have in-place counterpart. If main operation name is
operationName
, then mutating operation is namedoperationName$
. Usually in-place counterparts have return typeVoid
.General operations
transpose(dim1:Int, dim2: Int)
transpose along dimensionisContiguous()
is tensor contiguous?isTransposed()
is tensor transposed?clone()
contiguous()
returns contiguous tensorMath operations
cos
,sin
,tan
,acos
,asin
,atan
,cosh
abs
bernoulli
,normal
,rand
(statics too?)ceil
,floor
clamp(min, max)
exp
Scalar operations
add(_:T)
adds given value;sub(_:T)
subtracts given value;mul(_:T)
multiplies given value;div(_:T)
Comparison
ge
,gt
,le
,lt
,eq
Tensor operations
add(_:SWKTensor)
dot(_:SWKTensor)