task8
This commit is contained in:
parent
7a02dff345
commit
f0e10857a1
5 changed files with 29 additions and 32 deletions
|
|
@ -1,14 +1,17 @@
|
|||
// Compile with "make" / "make run" or
|
||||
// g++ *.cpp -O3 -ffast-math -lopenblas -llapacke -o main
|
||||
|
||||
|
||||
#include "task_3.h"
|
||||
#include "task_4+6.h"
|
||||
#include "task_5.h"
|
||||
#include "task_7.h"
|
||||
#include "timing.h"
|
||||
#include <cblas.h> // cBLAS Library
|
||||
#include <lapacke.h>
|
||||
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <cblas.h> // cBLAS Library
|
||||
#include <lapacke.h>
|
||||
|
||||
void task_1() {
|
||||
printf("\n\n-------------- Task 1 --------------\n\n");
|
||||
|
|
@ -231,7 +234,7 @@ void task_7() {
|
|||
// #################################
|
||||
// Benchmark
|
||||
|
||||
cout << fixed << setprecision(4); // 4 digits after decimal
|
||||
cout << fixed << setprecision(4);
|
||||
size_t NLOOPS = 1000;
|
||||
cout << "N = " << " | 1 | 2 | 4 | 8 | 16 | 32 " << endl;
|
||||
cout << "---------|--------|--------|--------|--------|--------|-------" << endl;
|
||||
|
|
@ -248,9 +251,6 @@ void task_7() {
|
|||
cout << endl;
|
||||
}
|
||||
printf("\nFor fixed n, the solution time per rhs does not slow down consistently and scales very well.\nIts faster than expected.");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#include "task_3.h"
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
using namespace std;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "task_3.h"
|
||||
#include "task_4+6.h"
|
||||
#include "timing.h"
|
||||
#include <cblas.h> // cBLAS Library
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <cblas.h> // cBLAS Library
|
||||
using namespace std;
|
||||
|
||||
void print_performance(double sec, size_t memory, size_t flops, unsigned int size) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
#include "task_7.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <lapacke.h>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
using namespace std;
|
||||
|
||||
tuple<vector<double>, vector<double>> init_M(size_t N, size_t Nrhs) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue