ViennaCL - The Vienna Computing Library: viennacl/linalg/detail/spai/block_vector.hpp Source File

ViennaCL - The Vienna Computing Library 1.7.1 Free open-source GPU-accelerated linear algebra and solver library. |

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
block_vector.hpp
Go to the documentation of this file.
1 #ifndef VIENNACL_LINALG_DETAIL_SPAI_BLOCK_VECTOR_HPP
2 #define VIENNACL_LINALG_DETAIL_SPAI_BLOCK_VECTOR_HPP
3
4 /* =========================================================================
5 Copyright (c) 2010-2016, 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
48 class block_vector
49 {
50 public:
51
53
55 viennacl::ocl::handle<cl_mem> & handle(){ return elements_; }
56
58 viennacl::ocl::handle<cl_mem> & handle1() { return start_block_inds_; }
59
61
63 const viennacl::ocl::handle<cl_mem> & handle() const { return elements_; }
64
66 const viennacl::ocl::handle<cl_mem> & handle1() const { return start_block_inds_; }
67
68 private:
69 viennacl::ocl::handle<cl_mem> elements_;
70 viennacl::ocl::handle<cl_mem> start_block_inds_;
71 };
72
73 }
74 }
75 }
76 }
77 #endif
viennacl::linalg::detail::spai::block_vector::handle1
viennacl::ocl::handle< cl_mem > & handle1()
Return handle to start indices.
Definition: block_vector.hpp:58
tools.hpp
Various little tools used here and there in ViennaCL.
viennacl::linalg::detail::spai::block_vector::handle1
const viennacl::ocl::handle< cl_mem > & handle1() const
Return handle to const start indices.
Definition: block_vector.hpp:66
viennacl::linalg::detail::spai::block_vector::handle
const viennacl::ocl::handle< cl_mem > & handle() const
Return handle to the const elements.
Definition: block_vector.hpp:63
viennacl::linalg::detail::spai::block_vector::handle
viennacl::ocl::handle< cl_mem > & handle()
Return handle to the elements.
Definition: block_vector.hpp:55
backend.hpp
Implementations of the OpenCL backend, where all contexts are stored in.
viennacl::linalg::detail::spai::block_vector
Represents a contiguous vector on the GPU to represent a concatentation of small vectors.
Definition: block_vector.hpp:48
viennacl::ocl::handle< cl_mem >