haydn-jones / TinyTen

Small and simple N-Dimensional Tensor implementation in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TinyTen

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++.

Operations

Indexing

  • Flat-indexing
  • Multidimensional indexing
  • Gather
  • Scatter
  • Slicing
  • Advanced indexing (numpy-style)
  • Boolean indexing (numpy-style)

Basic Math

  • +, -, *, /
  • 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

Statistical

  • Mean
  • Variance
  • Standard deviation
  • Min and max
  • Argmin and argmax
  • Sum
  • Product
  • Cumulative sum
  • Cumulative product
  • Median
  • Mode

Linear Algebra

  • Matrix multiplication
  • Dot product

Logic

  • Greater, Less, Equal, Not Equal, Greater Equal, Less Equal
  • Logical And, Or, Not, Xor
  • All, Any

Misc

  • 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

About

Small and simple N-Dimensional Tensor implementation in C++

License:MIT License


Languages

Language:C++ 93.2%Language:CMake 6.8%