PARALUTION  1.0.0
PARALUTION
host_conversion.hpp
Go to the documentation of this file.
1 #ifndef PARALUTION_HOST_CONVERSION_HPP_
2 #define PARALUTION_HOST_CONVERSION_HPP_
3 
4 #include "../matrix_formats.hpp"
5 
6 namespace paralution {
7 
8 template <typename ValueType, typename IndexType>
9 void csr_to_coo(const int omp_threads,
10  const IndexType nnz, const IndexType nrow, const IndexType ncol,
11  const MatrixCSR<ValueType, IndexType> &src,
12  MatrixCOO<ValueType, IndexType> *dst);
13 
14 template <typename ValueType, typename IndexType>
15 void csr_to_mcsr(const int omp_threads,
16  const IndexType nnz, const IndexType nrow, const IndexType ncol,
17  const MatrixCSR<ValueType, IndexType> &src,
18  MatrixMCSR<ValueType, IndexType> *dst);
19 
20 template <typename ValueType, typename IndexType>
21 void csr_to_dia(const int omp_threads,
22  const IndexType nnz, const IndexType nrow, const IndexType ncol,
23  const MatrixCSR<ValueType, IndexType> &src,
24  MatrixDIA<ValueType, IndexType> *dst, IndexType *nnz_dia);
25 
26 template <typename ValueType, typename IndexType>
27 void csr_to_dense(const int omp_threads,
28  const IndexType nnz, const IndexType nrow, const IndexType ncol,
29  const MatrixCSR<ValueType, IndexType> &src,
30  MatrixDENSE<ValueType> *dst);
31 
32 template <typename ValueType, typename IndexType>
33 void csr_to_ell(const int omp_threads,
34  const IndexType nnz, const IndexType nrow, const IndexType ncol,
35  const MatrixCSR<ValueType, IndexType> &src,
36  MatrixELL<ValueType, IndexType> *dst, IndexType *nnz_ell);
37 
38 template <typename ValueType, typename IndexType>
39 void csr_to_hyb(const int omp_threads,
40  const IndexType nnz, const IndexType nrow, const IndexType ncol,
41  const MatrixCSR<ValueType, IndexType> &src,
42  MatrixHYB<ValueType, IndexType> *dst,
43  IndexType *nnz_hyb, IndexType *nnz_ell, IndexType *nnz_coo);
44 
45 template <typename ValueType, typename IndexType>
46 void dense_to_csr(const int omp_threads,
47  const IndexType nrow, const IndexType ncol,
48  const MatrixDENSE<ValueType> &src,
49  MatrixCSR<ValueType, IndexType> *dst,
50  IndexType *nnz);
51 
52 template <typename ValueType, typename IndexType>
53 void dia_to_csr(const int omp_threads,
54  const IndexType nnz, const IndexType nrow, const IndexType ncol,
55  const MatrixDIA<ValueType, IndexType> &src,
56  MatrixCSR<ValueType, IndexType> *dst, IndexType *nnz_csr);
57 
58 template <typename ValueType, typename IndexType>
59 void ell_to_csr(const int omp_threads,
60  const IndexType nnz, const IndexType nrow, const IndexType ncol,
61  const MatrixELL<ValueType, IndexType> &src,
62  MatrixCSR<ValueType, IndexType> *dst, IndexType *nnz_csr);
63 
64 template <typename ValueType, typename IndexType>
65 void coo_to_csr(const int omp_threads,
66  const IndexType nnz, const IndexType nrow, const IndexType ncol,
67  const MatrixCOO<ValueType, IndexType> &src,
68  MatrixCSR<ValueType, IndexType> *dst);
69 
70 template <typename ValueType, typename IndexType>
71 void mcsr_to_csr(const int omp_threads,
72  const IndexType nnz, const IndexType nrow, const IndexType ncol,
73  const MatrixMCSR<ValueType, IndexType> &src,
74  MatrixCSR<ValueType, IndexType> *dst);
75 
76 template <typename ValueType, typename IndexType>
77 void hyb_to_csr(const int omp_threads,
78  const IndexType nnz, const IndexType nrow, const IndexType ncol,
79  const IndexType nnz_ell, const IndexType nnz_coo,
80  const MatrixHYB<ValueType, IndexType> &src,
81  MatrixCSR<ValueType, IndexType> *dst, IndexType *nnz_csr);
82 
83 
84 }
85 
86 #endif // PARALUTION_HOST_CONVERSION_HPP_
void dense_to_csr(const int omp_threads, const IndexType nrow, const IndexType ncol, const MatrixDENSE< ValueType > &src, MatrixCSR< ValueType, IndexType > *dst, IndexType *nnz)
Definition: host_conversion.cpp:42
void coo_to_csr(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixCOO< ValueType, IndexType > &src, MatrixCSR< ValueType, IndexType > *dst)
Definition: host_conversion.cpp:500
void csr_to_dense(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixCSR< ValueType, IndexType > &src, MatrixDENSE< ValueType > *dst)
Definition: host_conversion.cpp:20
void ell_to_csr(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixELL< ValueType, IndexType > &src, MatrixCSR< ValueType, IndexType > *dst, IndexType *nnz_csr)
Definition: host_conversion.cpp:323
void csr_to_dia(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixCSR< ValueType, IndexType > &src, MatrixDIA< ValueType, IndexType > *dst, IndexType *nnz_dia)
Definition: host_conversion.cpp:585
void csr_to_coo(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixCSR< ValueType, IndexType > &src, MatrixCOO< ValueType, IndexType > *dst)
Definition: host_conversion.cpp:232
nnz
Definition: pcg_example.m:8
void hyb_to_csr(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const IndexType nnz_ell, const IndexType nnz_coo, const MatrixHYB< ValueType, IndexType > &src, MatrixCSR< ValueType, IndexType > *dst, IndexType *nnz_csr)
Definition: host_conversion.cpp:390
void dia_to_csr(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixDIA< ValueType, IndexType > &src, MatrixCSR< ValueType, IndexType > *dst, IndexType *nnz_csr)
Definition: host_conversion.cpp:675
void csr_to_mcsr(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixCSR< ValueType, IndexType > &src, MatrixMCSR< ValueType, IndexType > *dst)
Definition: host_conversion.cpp:94
Definition: backend_manager.cpp:43
void mcsr_to_csr(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixMCSR< ValueType, IndexType > &src, MatrixCSR< ValueType, IndexType > *dst)
Definition: host_conversion.cpp:161
void csr_to_ell(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixCSR< ValueType, IndexType > &src, MatrixELL< ValueType, IndexType > *dst, IndexType *nnz_ell)
Definition: host_conversion.cpp:267
void csr_to_hyb(const int omp_threads, const IndexType nnz, const IndexType nrow, const IndexType ncol, const MatrixCSR< ValueType, IndexType > &src, MatrixHYB< ValueType, IndexType > *dst, IndexType *nnz_hyb, IndexType *nnz_ell, IndexType *nnz_coo)
Definition: host_conversion.cpp:750