ViennaCL - The Vienna Computing Library  1.5.0
Data Structures | Namespaces | Functions
viennacl/compressed_matrix.hpp File Reference

Implementation of the compressed_matrix class. More...

#include <vector>
#include <list>
#include <map>
#include "viennacl/forwards.h"
#include "viennacl/vector.hpp"
#include "viennacl/linalg/sparse_matrix_operations.hpp"
#include "viennacl/tools/tools.hpp"
#include "viennacl/tools/entry_proxy.hpp"

Go to the source code of this file.

Data Structures

class  compressed_matrix< SCALARTYPE, ALIGNMENT >
 A sparse square matrix in compressed sparse rows format. More...

Namespaces

namespace  viennacl
 

Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.


namespace  viennacl::detail
 

Holds implementation details for functionality in the main viennacl-namespace. Not intended for direct use by library users.


Functions

template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy_impl (const CPU_MATRIX &cpu_matrix, compressed_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix, vcl_size_t nonzeros)
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const CPU_MATRIX &cpu_matrix, compressed_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 Copies a sparse matrix from the host to the OpenCL device (either GPU or multi-core CPU)
template<typename SizeType , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const std::vector< std::map< SizeType, SCALARTYPE > > &cpu_matrix, compressed_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 Copies a sparse square matrix in the std::vector< std::map < > > format to an OpenCL device. Use viennacl::tools::sparse_matrix_adapter for non-square matrices.
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const compressed_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix, CPU_MATRIX &cpu_matrix)
 Copies a sparse matrix from the OpenCL device (either GPU or multi-core CPU) to the host.
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const compressed_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix, std::vector< std::map< unsigned int, SCALARTYPE > > &cpu_matrix)
 Copies a sparse matrix from an OpenCL device to the host. The host type is the std::vector< std::map < > > format .

Detailed Description

Implementation of the compressed_matrix class.