An open API service indexing awesome lists of open source software.

https://github.com/oniani/tensor

A fast, zero-dependency tensor library in under 1000 lines of C++
https://github.com/oniani/tensor

cpp dl ml tensor

Last synced: 7 months ago
JSON representation

A fast, zero-dependency tensor library in under 1000 lines of C++

Awesome Lists containing this project

README

          

# tensor

A fast, zero-dependency tensor library in under 1000 lines of C++.

## API

```cpp
#include "tensor.hpp"

using namespace type;

int main() {
tensor2 t{{0, 1}, {2, 3}, {4, 5}};
t.square().print();
}
```

## Testing

```console
$ mkdir build
$ cd build
$ cmake -DCOMPILER=clang -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=VCPKG_TOOLCHAIN_FILE ..
$ cmake --build .
```

## References

- [Tensor][tensor]

## License

[MIT License][license]

[tensor]: https://en.wikipedia.org/wiki/Tensor
[license]: LICENSE