All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
block_matrix.hpp
Go to the documentation of this file.
#ifndef VIENNACL_LINALG_DETAIL_SPAI_BLOCK_MATRIX_HPP
#define VIENNACL_LINALG_DETAIL_SPAI_BLOCK_MATRIX_HPP
/* =========================================================================
Copyright (c) 2010-2016, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
Portions of this software are copyright by UChicago Argonne, LLC.
-----------------
ViennaCL - The Vienna Computing Library
-----------------
Project Head: Karl Rupp rupp@iue.tuwien.ac.at
(A list of authors and contributors can be found in the manual)
License: MIT (X11), see file LICENSE in the base directory
============================================================================= */
#include <utility>
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <vector>
#include "viennacl/ocl/backend.hpp"
#include "viennacl/tools/tools.hpp"
namespace viennacl
{
namespace linalg
{
namespace detail
{
namespace spai
{
class block_matrix
{
public:
viennacl::ocl::handle<cl_mem>& handle(){ return elements_; }
viennacl::ocl::handle<cl_mem>& handle1() { return matrix_dimensions_; }
viennacl::ocl::handle<cl_mem>& handle2() { return start_block_inds_; }
const viennacl::ocl::handle<cl_mem>& handle() const { return elements_; }
const viennacl::ocl::handle<cl_mem>& handle1() const { return matrix_dimensions_; }
const viennacl::ocl::handle<cl_mem>& handle2() const { return start_block_inds_; }
private:
viennacl::ocl::handle<cl_mem> elements_;
viennacl::ocl::handle<cl_mem> matrix_dimensions_;
viennacl::ocl::handle<cl_mem> start_block_inds_;
};
}
}
}
}
#endif
viennacl::linalg::detail::spai::block_matrix
Represents contigious matrices on GPU.
Definition: block_matrix.hpp:49
viennacl::linalg::detail::spai::block_matrix::handle
viennacl::ocl::handle< cl_mem > & handle()
Returns a handle to the elements.
Definition: block_matrix.hpp:56
tools.hpp
Various little tools used here and there in ViennaCL.
viennacl::linalg::detail::spai::block_matrix::handle
const viennacl::ocl::handle< cl_mem > & handle() const
Returns a handle to the const elements.
Definition: block_matrix.hpp:67
viennacl::linalg::detail::spai::block_matrix::handle1
viennacl::ocl::handle< cl_mem > & handle1()
Returns a handle to the matrix dimensions.
Definition: block_matrix.hpp:59
backend.hpp
Implementations of the OpenCL backend, where all contexts are stored in.
viennacl::linalg::detail::spai::block_matrix::handle2
viennacl::ocl::handle< cl_mem > & handle2()
Returns a handle to the start indices of matrix.
Definition: block_matrix.hpp:62
viennacl::linalg::detail::spai::block_matrix::handle2
const viennacl::ocl::handle< cl_mem > & handle2() const
Returns a handle to the const start indices of matrix.
Definition: block_matrix.hpp:73
viennacl::linalg::detail::spai::block_matrix::handle1
const viennacl::ocl::handle< cl_mem > & handle1() const
Returns a handle to the const matrix dimensions.
Definition: block_matrix.hpp:70
viennacl::ocl::handle< cl_mem >