ViennaCL - The Vienna Computing Library  1.5.2
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-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 matrix_dimensions_; }
64  viennacl::ocl::handle<cl_mem>& handle2() { return start_block_inds_; }
65 
69  const viennacl::ocl::handle<cl_mem>& handle() const { return elements_; }
73  const viennacl::ocl::handle<cl_mem>& handle1() const { return matrix_dimensions_; }
77  const viennacl::ocl::handle<cl_mem>& handle2() const { return start_block_inds_; }
78  private:
80  viennacl::ocl::handle<cl_mem> matrix_dimensions_;
81  viennacl::ocl::handle<cl_mem> start_block_inds_;
82  };
83 
84 
85  }
86  }
87  }
88 }
89 #endif
Represents a contigious matrices on GPU.
Definition: block_matrix.hpp:49
const viennacl::ocl::handle< cl_mem > & handle1() const
Returns a handle to the const matrix dimensions.
Definition: block_matrix.hpp:73
viennacl::ocl::handle< cl_mem > & handle()
Returns a handle to the elements.
Definition: block_matrix.hpp:56
Various little tools used here and there in ViennaCL.
viennacl::ocl::handle< cl_mem > & handle2()
Returns a handle to the start indices of matrix.
Definition: block_matrix.hpp:64
const viennacl::ocl::handle< cl_mem > & handle() const
Returns a handle to the const elements.
Definition: block_matrix.hpp:69
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
Definition: cpu_ram.hpp:29
const viennacl::ocl::handle< cl_mem > & handle2() const
Returns a handle to the const start indices of matrix.
Definition: block_matrix.hpp:77
Implementations of the OpenCL backend, where all contexts are stored in.
viennacl::ocl::handle< cl_mem > & handle1()
Returns a handle to the matrix dimensions.
Definition: block_matrix.hpp:60