ViennaCL - The Vienna Computing Library  1.5.2
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-2014, 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 PDF 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 
56  viennacl::ocl::handle<cl_mem>& handle(){ return elements_; }
60  viennacl::ocl::handle<cl_mem>& handle1() { return start_block_inds_; }
61 
65  const viennacl::ocl::handle<cl_mem>& handle() const { return elements_; }
69  const viennacl::ocl::handle<cl_mem>& handle1() const { return start_block_inds_; }
70  private:
72  viennacl::ocl::handle<cl_mem> start_block_inds_;
73  };
74  }
75  }
76  }
77 }
78 #endif
viennacl::ocl::handle< cl_mem > & handle1()
Return handle to start indices.
Definition: block_vector.hpp:60
const viennacl::ocl::handle< cl_mem > & handle1() const
Return handle to const start indices.
Definition: block_vector.hpp:69
Various little tools used here and there in ViennaCL.
viennacl::ocl::handle< cl_mem > & handle()
Return handle to the elements.
Definition: block_vector.hpp:56
const viennacl::ocl::handle< cl_mem > & handle() const
Return handle to the const elements.
Definition: block_vector.hpp:65
Implementations of the OpenCL backend, where all contexts are stored in.
Represents a contigious vector on GPU.
Definition: block_vector.hpp:49