28 #ifndef SPLA_STORAGE_MANAGER_MATRIX_HPP
29 #define SPLA_STORAGE_MANAGER_MATRIX_HPP
39 #if defined(SPLA_BUILD_OPENCL)
68 auto* lil = s.template get<CpuLil<T>>();
73 auto* dok = s.template get<CpuDok<T>>();
77 auto* coo = s.template get<CpuCoo<T>>();
82 auto* lil = s.template get<CpuLil<T>>();
83 auto* dok = s.template get<CpuDok<T>>();
88 auto* lil = s.template get<CpuLil<T>>();
89 auto* coo = s.template get<CpuCoo<T>>();
94 auto* lil = s.template get<CpuLil<T>>();
95 auto* csr = s.template get<CpuCsr<T>>();
101 auto* coo = s.template get<CpuCoo<T>>();
102 auto* lil = s.template get<CpuLil<T>>();
108 auto* coo = s.template get<CpuCoo<T>>();
109 auto* dok = s.template get<CpuDok<T>>();
114 auto* coo = s.template get<CpuCoo<T>>();
115 auto* csr = s.template get<CpuCsr<T>>();
121 auto* csr = s.template get<CpuCsr<T>>();
122 auto* dok = s.template get<CpuDok<T>>();
127 auto* csr = s.template get<CpuCsr<T>>();
128 auto* coo = s.template get<CpuCoo<T>>();
133 #if defined(SPLA_BUILD_OPENCL)
139 auto* cpu_csr = s.template get<CpuCsr<T>>();
140 auto* cl_csr = s.template get<CLCsr<T>>();
141 cl_csr_init(s.get_n_rows(), cpu_csr->values, cpu_csr->Ap.data(), cpu_csr->Aj.data(), cpu_csr->Ax.data(), *cl_csr);
145 auto* cl_acc = get_acc_cl();
146 auto* cl_csr = s.template get<CLCsr<T>>();
147 auto* cpu_csr = s.template get<CpuCsr<T>>();
149 if (!cl_acc->is_img()) {
150 cl_csr_read(s.get_n_rows(), cl_csr->values, cpu_csr->Ap.data(), cpu_csr->Aj.data(), cpu_csr->Ax.data(), *cl_csr, cl_acc->get_queue_default());
155 cl_csr_read(s.get_n_rows(), cl_csr->values, cpu_csr->Ap.data(), cpu_csr->Aj.data(), cpu_csr->Ax.data(), *cl_csr, cl_acc->get_queue_default(),
156 CL_MEM_HOST_READ_ONLY | CL_MEM_ALLOC_HOST_PTR);
CPU list of coordinates matrix format.
Definition: cpu_formats.hpp:148
CPU compressed sparse row matrix format.
Definition: cpu_formats.hpp:166
Dictionary of keys sparse matrix format.
Definition: cpu_formats.hpp:128
CPU list-of-list matrix format for fast incremental build.
Definition: cpu_formats.hpp:107
General format converter for vector or matrix decoration storage.
Definition: storage_manager.hpp:57
Storage for decorators with data of a particular vector or matrix object.
Definition: tdecoration.hpp:70
void cpu_coo_to_csr(uint n_rows, const CpuCoo< T > &in, CpuCsr< T > &out)
Definition: cpu_format_coo.hpp:96
void cpu_dok_clear(CpuDok< T > &storage)
Definition: cpu_format_dok.hpp:41
void register_converter(F from, F to, Function function)
Definition: storage_manager.hpp:112
void cpu_coo_resize(const uint n_values, CpuCoo< T > &storage)
Definition: cpu_format_coo.hpp:41
void cpu_lil_clear(CpuLil< T > &lil)
Definition: cpu_format_lil.hpp:47
void cl_csr_init(std::size_t n_rows, std::size_t n_values, const uint *Ap, const uint *Aj, const T *Ax, CLCsr< T > &storage)
Definition: cl_format_csr.hpp:41
void cpu_csr_to_dok(uint n_rows, const CpuCsr< T > &in, CpuDok< T > &out)
Definition: cpu_format_csr.hpp:51
void cpu_coo_clear(CpuCoo< T > &in)
Definition: cpu_format_coo.hpp:50
void cpu_lil_to_dok(uint n_rows, const CpuLil< T > &in, CpuDok< T > &out)
Definition: cpu_format_lil.hpp:76
void cpu_coo_to_dok(const CpuCoo< T > &in, CpuDok< T > &out)
Definition: cpu_format_coo.hpp:79
void cpu_coo_to_lil(uint n_rows, const CpuCoo< T > &in, CpuLil< T > &out)
Definition: cpu_format_coo.hpp:58
void cl_csr_read(std::size_t n_rows, std::size_t n_values, uint *Ap, uint *Aj, T *Ax, CLCsr< T > &storage, cl::CommandQueue &queue, cl_mem_flags staging_flags=CL_MEM_READ_ONLY|CL_MEM_HOST_READ_ONLY|CL_MEM_ALLOC_HOST_PTR, bool blocking=true)
Definition: cl_format_csr.hpp:80
void cpu_lil_to_csr(uint n_rows, const CpuLil< T > &in, CpuCsr< T > &out)
Definition: cpu_format_lil.hpp:119
void cpu_csr_to_coo(uint n_rows, const CpuCsr< T > &in, CpuCoo< T > &out)
Definition: cpu_format_csr.hpp:68
void cpu_lil_resize(uint n_rows, CpuLil< T > &lil)
Definition: cpu_format_lil.hpp:41
void register_validator_discard(F format, Function function)
Definition: storage_manager.hpp:107
void cpu_csr_resize(const uint n_rows, const uint n_values, CpuCsr< T > &storage)
Definition: cpu_format_csr.hpp:41
void cpu_lil_to_coo(uint n_rows, const CpuLil< T > &in, CpuCoo< T > &out)
Definition: cpu_format_lil.hpp:94
void register_constructor(F format, Function function)
Definition: storage_manager.hpp:92
ref_ptr< T > make_ref(TArgs &&... args)
Definition: ref.hpp:246
Definition: algorithm.hpp:37
void register_formats_matrix(StorageManagerMatrix< T > &manager)
Definition: storage_manager_matrix.hpp:51