Skip to content

Commit

Permalink
update all test outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtghorbani committed Jul 26, 2024
1 parent aef1b1c commit d864866
Show file tree
Hide file tree
Showing 94 changed files with 14,902 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/resources/correct_test_outputs/LRA_w_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,48 @@ C[i][j] = 0.0;

long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

A[i][j] += (f[i] * f[j]);
}
}
}
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

B[i][j] += (g[i] * g[j]);
}
}
}
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

C[i][j] += (f[i] * f[j]);
}
}
}
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

C[i][j] += (g[i] * g[j]);
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
long time_reconstruction = 0, start_reconstruction, end_reconstruction;
start_reconstruction = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
for (int i = 0; i < N; ++i) {

int jp = i;
Expand All @@ -99,6 +108,8 @@ int ip = j;
A[i][j] = A[ip][jp];
}
}
}
{
for (int i = 0; i < N; ++i) {

int jp = i;
Expand All @@ -108,6 +119,8 @@ int ip = j;
B[i][j] = B[ip][jp];
}
}
}
{
for (int i = 0; i < N; ++i) {

int jp = i;
Expand All @@ -117,6 +130,7 @@ int ip = j;
C[i][j] = C[ip][jp];
}
}
}
end_reconstruction = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_reconstruction = end_reconstruction - start_reconstruction;
cout << time_reconstruction << endl;
Expand Down
14 changes: 14 additions & 0 deletions src/test/resources/correct_test_outputs/LRA_wo_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,48 @@ void fn(double ** A, double * f, double ** B, double * g, double ** C, int N) {

long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

A[i][j] += (f[i] * f[j]);
}
}
}
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

B[i][j] += (g[i] * g[j]);
}
}
}
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

C[i][j] += (f[i] * f[j]);
}
}
}
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

C[i][j] += (g[i] * g[j]);
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
long time_reconstruction = 0, start_reconstruction, end_reconstruction;
start_reconstruction = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
for (int i = 0; i < N; ++i) {

int jp = i;
Expand All @@ -55,6 +64,8 @@ int ip = j;
A[i][j] = A[ip][jp];
}
}
}
{
for (int i = 0; i < N; ++i) {

int jp = i;
Expand All @@ -64,6 +75,8 @@ int ip = j;
B[i][j] = B[ip][jp];
}
}
}
{
for (int i = 0; i < N; ++i) {

int jp = i;
Expand All @@ -73,6 +86,7 @@ int ip = j;
C[i][j] = C[ip][jp];
}
}
}
end_reconstruction = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_reconstruction = end_reconstruction - start_reconstruction;
cout << time_reconstruction << endl;
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/correct_test_outputs/LRC_w_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,21 @@ A[i][j] = 0.0;

long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

A[i][j] += (f[i] * f[j]);
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
long time_reconstruction = 0, start_reconstruction, end_reconstruction;
start_reconstruction = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
for (int i = 0; i < N; ++i) {

int jp = i;
Expand All @@ -53,6 +56,7 @@ int ip = j;
A[i][j] = A[ip][jp];
}
}
}
end_reconstruction = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_reconstruction = end_reconstruction - start_reconstruction;
cout << time_reconstruction << endl;
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/correct_test_outputs/LRC_wo_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ void fn(double ** A, double * f, int N) {

long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
for (int i = 0; i < N; ++i) {

for (int j = max({i, 0}); j < N; ++j) {

A[i][j] += (f[i] * f[j]);
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
long time_reconstruction = 0, start_reconstruction, end_reconstruction;
start_reconstruction = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
for (int i = 0; i < N; ++i) {

int jp = i;
Expand All @@ -34,6 +37,7 @@ int ip = j;
A[i][j] = A[ip][jp];
}
}
}
end_reconstruction = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_reconstruction = end_reconstruction - start_reconstruction;
cout << time_reconstruction << endl;
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/correct_test_outputs/MTTKRP_IJ_w_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ A[i][j] = 0.0;

long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
int i = I;
if (i >= 0 && i < M) {
int j = J;
Expand All @@ -84,6 +85,7 @@ A[i][j] += (B[i][k][l] * C[k][j] * D[l][j]);
}
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@ for (size_t j = 0; j < Q; ++j) {
A[i][j] = 0.0;
}
}
{
for (int l = 0; l < P; ++l) {

int j = J;
if (j >= 0 && j < Q) {
D2[l] += D[l][j];
}
}
}
{
for (int k = 0; k < N; ++k) {

for (int l = 0; l < P; ++l) {
Expand All @@ -97,8 +100,10 @@ B2[k][l] += B[i][k][l];
}
}
}
}
long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
int i = I;
int j = J;
if (j >= 0 && j < Q) {
Expand All @@ -110,6 +115,7 @@ A[i][j] += (B2[k][l] * C[k][j] * D2[l]);
}
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/correct_test_outputs/MTTKRP_IJ_wo_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void fn(double ** A, double *** B, double ** C, double ** D, int M, int N, int P

long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
int i = I;
if (i >= 0 && i < M) {
int j = J;
Expand All @@ -26,6 +27,7 @@ A[i][j] += (B[i][k][l] * C[k][j] * D[l][j]);
}
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ using namespace std::chrono;
extern "C"
void fn(double * D2, double ** D, double ** B2, double *** B, double ** A, double ** C, int M, int N, int P, int Q, int I, int J) {

{
for (int l = 0; l < P; ++l) {

int j = J;
if (j >= 0 && j < Q) {
D2[l] += D[l][j];
}
}
}
{
for (int k = 0; k < N; ++k) {

for (int l = 0; l < P; ++l) {
Expand All @@ -27,8 +30,10 @@ B2[k][l] += B[i][k][l];
}
}
}
}
long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
int i = I;
int j = J;
if (j >= 0 && j < Q) {
Expand All @@ -40,6 +45,7 @@ A[i][j] += (B2[k][l] * C[k][j] * D2[l]);
}
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/correct_test_outputs/MTTKRP_I_w_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ A[i][j] = 0.0;

long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
int i = I;
if (i >= 0 && i < M) {
for (int j = 0; j < Q; ++j) {
Expand All @@ -83,6 +84,7 @@ A[i][j] += (B[i][k][l] * C[k][j] * D[l][j]);
}
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ for (size_t j = 0; j < Q; ++j) {
A[i][j] = 0.0;
}
}
{
for (int k = 0; k < N; ++k) {

for (int l = 0; l < P; ++l) {
Expand All @@ -85,8 +86,10 @@ B2[k][l] += B[i][k][l];
}
}
}
}
long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
int i = I;
for (int j = 0; j < Q; ++j) {

Expand All @@ -98,6 +101,7 @@ A[i][j] += (B2[k][l] * C[k][j] * D[l][j]);
}
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/correct_test_outputs/MTTKRP_I_wo_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void fn(double ** A, double *** B, double ** C, double ** D, int M, int N, int P

long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
int i = I;
if (i >= 0 && i < M) {
for (int j = 0; j < Q; ++j) {
Expand All @@ -26,6 +27,7 @@ A[i][j] += (B[i][k][l] * C[k][j] * D[l][j]);
}
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using namespace std::chrono;
extern "C"
void fn(double ** B2, double *** B, double ** A, double ** C, double ** D, int M, int N, int P, int Q, int I) {

{
for (int k = 0; k < N; ++k) {

for (int l = 0; l < P; ++l) {
Expand All @@ -20,8 +21,10 @@ B2[k][l] += B[i][k][l];
}
}
}
}
long time_computation = 0, start_computation, end_computation;
start_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
{
int i = I;
for (int j = 0; j < Q; ++j) {

Expand All @@ -33,6 +36,7 @@ A[i][j] += (B2[k][l] * C[k][j] * D[l][j]);
}
}
}
}
end_computation = duration_cast<microseconds>(system_clock::now().time_since_epoch()).count();
time_computation = end_computation - start_computation;
cout << time_computation << endl;
Expand Down
Loading

0 comments on commit d864866

Please sign in to comment.