I had a tiny tensor, his name was TinyTen, I put him out on github to see if he could swim 🎶
Small and simple, header-only, N-Dimensional Tensor implementation in C++.
- Flat-indexing
- Multidimensional indexing
- Gather
- Scatter
- Slicing
- Advanced indexing (numpy-style)
- Boolean indexing (numpy-style)
- +, -, *, /
- Generic apply
- Pow
- Hyperbolic functions (sinh, cosh, tanh, etc.)
- Inverse trigonometric functions (asin, acos, atan, etc.)
- Trigonometric functions (sin, cos, tan, etc.)
- Sqrt
- Square
- Exp
- Log
- Absolute (abs)
- Negation
- Ceiling
- Floor
- Round
- Modulo
- Logarithms of different bases (e.g., log2, log10)
- Truncation
- Sign function
- Clamp
- Mean
- Variance
- Standard deviation
- Min and max
- Argmin and argmax
- Sum
- Product
- Cumulative sum
- Cumulative product
- Median
- Mode
- Matrix multiplication
- Dot product
- Greater, Less, Equal, Not Equal, Greater Equal, Less Equal
- Logical And, Or, Not, Xor
- All, Any
- Reshape
- Transpose / Permute
- Concatenate
- Stack/VStack/HStack
- Split
- Views
- Padding
- Broadcasting
- Reduction operations (along specific axes)
- Tile/Repeat
- Flatten
- Diagonal extraction and creation
- Sort
- Unique elements
- One-hot encoding