BojanFaletic / Matrix

simple matrix class, used for performing dot product.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Matrix

This repo contain simple matrix class. It is used for performing dot product on 2d vectors. AI is just matrix multiplication :).

For my CPU (i7-7820) additional performance can be achieved with.

clang++ -O2 -march=haswell

Performance increase is cca 2% compared without specifying architecture.

Matrix has support for sparse dot product. If input vector has some of values zero, then multiplication in that row is not required. For initial testing if sparsity is 60% percent then performance increase 57% compared with normal dot product.

Building

make test_fixed && ./test_fixed

About

simple matrix class, used for performing dot product.


Languages

Language:C++ 94.5%Language:Makefile 5.5%