ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
block_matrix.hpp
Go to the documentation of this file.
1 #ifndef VIENNACL_LINALG_DETAIL_SPAI_BLOCK_MATRIX_HPP
2 #define VIENNACL_LINALG_DETAIL_SPAI_BLOCK_MATRIX_HPP
3 
4 /* =========================================================================
5  Copyright (c) 2010-2015, Institute for Microelectronics,
6  Institute for Analysis and Scientific Computing,
7  TU Wien.
8  Portions of this software are copyright by UChicago Argonne, LLC.
9 
10  -----------------
11  ViennaCL - The Vienna Computing Library
12  -----------------
13 
14  Project Head: Karl Rupp rupp@iue.tuwien.ac.at
15 
16  (A list of authors and contributors can be found in the manual)
17 
18  License: MIT (X11), see file LICENSE in the base directory
19 ============================================================================= */
20 
21 #include <utility>
22 #include <iostream>
23 #include <fstream>
24 #include <string>
25 #include <algorithm>
26 #include <vector>
27 #include "viennacl/ocl/backend.hpp"
28 #include "viennacl/tools/tools.hpp"
29 
36 namespace viennacl
37 {
38 namespace linalg
39 {
40 namespace detail
41 {
42 namespace spai
43 {
44 
50 {
51 public:
52 
54 
56  viennacl::ocl::handle<cl_mem>& handle(){ return elements_; }
57 
59  viennacl::ocl::handle<cl_mem>& handle1() { return matrix_dimensions_; }
60 
62  viennacl::ocl::handle<cl_mem>& handle2() { return start_block_inds_; }
63 
65 
67  const viennacl::ocl::handle<cl_mem>& handle() const { return elements_; }
68 
70  const viennacl::ocl::handle<cl_mem>& handle1() const { return matrix_dimensions_; }
71 
73  const viennacl::ocl::handle<cl_mem>& handle2() const { return start_block_inds_; }
74 
75 private:
77  viennacl::ocl::handle<cl_mem> matrix_dimensions_;
78  viennacl::ocl::handle<cl_mem> start_block_inds_;
79 };
80 
81 
82 }
83 }
84 }
85 }
86 #endif
Represents contigious matrices on GPU.
viennacl::ocl::handle< cl_mem > & handle()
Returns a handle to the elements.
Various little tools used here and there in ViennaCL.
const viennacl::ocl::handle< cl_mem > & handle() const
Returns a handle to the const elements.
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
Definition: cpu_ram.hpp:34
Definition: blas3.hpp:36
viennacl::ocl::handle< cl_mem > & handle1()
Returns a handle to the matrix dimensions.
Implementations of the OpenCL backend, where all contexts are stored in.
viennacl::ocl::handle< cl_mem > & handle2()
Returns a handle to the start indices of matrix.
const viennacl::ocl::handle< cl_mem > & handle2() const
Returns a handle to the const start indices of matrix.
const viennacl::ocl::handle< cl_mem > & handle1() const
Returns a handle to the const matrix dimensions.