WIP 2 - need to implement 2x1x1

This commit is contained in:
Everton Constantino
2021-05-18 20:42:08 +00:00
parent 029f78abf0
commit 6533187280
4 changed files with 167 additions and 26 deletions

View File

@@ -15,7 +15,8 @@ void set(MatrixXf& A, int m, int n, int id, int digits)
int main(int argc, char* argv[])
{
#ifdef __DEBUG__
int m = 9, k = 9, n = 9, max = std::max(std::max(m,k),n);
int m = std::atoi(argv[1]), k = std::atoi(argv[1]), n = std::atoi(argv[1]);
int max = std::max(std::max(m,k),n);
MatrixXf A = MatrixXf::Zero(m, k);
MatrixXf B = MatrixXf::Zero(k, n);
MatrixXf C = MatrixXf::Zero(m, n);
@@ -24,7 +25,8 @@ int main(int argc, char* argv[])
set(A, m, k, 1, static_cast<int>(std::log10(max)) + 1);
set(B, k, n, 2, static_cast<int>(std::log10(max)) + 1);
C = A*B;
for(auto i = 0; i < 2; i++)
C = A*B;
std::cout << A << std::endl;
std::cout << B << std::endl;