Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
pjessesco committed Dec 31, 2024
1 parent a767c03 commit 3485c4f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Peanut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@

#include "longmatstr.h"

#define SUM_STR (mat1+mat1)
#define MAT_STR NUMSTR_100, NUMSTR_100
#define SUM_STR (mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1+mat1)
#define MAT_STR NUMSTR_100, NUMSTR_100, NUMSTR_100, NUMSTR_100

int main() {
constexpr int row = 20;
constexpr int col = 10;
int iter = 1000000;
constexpr int col = 20;
int iter = 100000;
// Peanut benchmarking
{
Peanut::Matrix<int, row, col> mat1{MAT_STR};
Peanut::Matrix<int, row, col> mat;

auto time1 = std::chrono::high_resolution_clock::now();
for(int i=0;i<iter;i++){
mat = (SUM_STR).eval();
mat = (SUM_STR);
}
auto time2 = std::chrono::high_resolution_clock::now();

Expand Down

0 comments on commit 3485c4f

Please sign in to comment.