Delete Sheet5/bench_funcs.h
This commit is contained in:
parent
c363644922
commit
05e91ffb75
1 changed files with 0 additions and 29 deletions
|
|
@ -1,29 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include <vector>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
// scalar and vector operations
|
|
||||||
double sum_basic(const std::vector<double>& x); // A) parallel sum
|
|
||||||
double dot_basic(const std::vector<double>& x, const std::vector<double>& y); // A) inner product
|
|
||||||
double dot_kahan(const std::vector<double>& x, const std::vector<double>& y);
|
|
||||||
double norm_basic(const std::vector<double>& x);
|
|
||||||
|
|
||||||
// matrix-vector, matrix-matrix, polynomial
|
|
||||||
void matvec_rowmajor(const std::vector<double>& A, std::size_t M, std::size_t N,
|
|
||||||
const std::vector<double>& x, std::vector<double>& b);
|
|
||||||
|
|
||||||
void matmul_rowmajor(const std::vector<double>& A, std::size_t M, std::size_t L,
|
|
||||||
const std::vector<double>& B, std::size_t N,
|
|
||||||
std::vector<double>& C);
|
|
||||||
|
|
||||||
void polyp_horner(const std::vector<double>& a, const std::vector<double>& x,
|
|
||||||
std::vector<double>& y);
|
|
||||||
|
|
||||||
struct CSR {
|
|
||||||
std::size_t n;
|
|
||||||
std::vector<double> val;
|
|
||||||
std::vector<std::size_t> col;
|
|
||||||
std::vector<std::size_t> row_ptr;
|
|
||||||
};
|
|
||||||
void jacobi_csr(const CSR& K, const std::vector<double>& f, std::vector<double>& u,
|
|
||||||
std::size_t max_iter, double omega, double tol);
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue