ViennaCL - The Vienna Computing Library  1.5.2
viennacl/linalg/detail/spai/block_matrix.hpp
Go to the documentation of this file.
00001 #ifndef VIENNACL_LINALG_DETAIL_SPAI_BLOCK_MATRIX_HPP
00002 #define VIENNACL_LINALG_DETAIL_SPAI_BLOCK_MATRIX_HPP
00003 
00004 /* =========================================================================
00005    Copyright (c) 2010-2014, Institute for Microelectronics,
00006                             Institute for Analysis and Scientific Computing,
00007                             TU Wien.
00008    Portions of this software are copyright by UChicago Argonne, LLC.
00009 
00010                             -----------------
00011                   ViennaCL - The Vienna Computing Library
00012                             -----------------
00013 
00014    Project Head:    Karl Rupp                   rupp@iue.tuwien.ac.at
00015 
00016    (A list of authors and contributors can be found in the PDF manual)
00017 
00018    License:         MIT (X11), see file LICENSE in the base directory
00019 ============================================================================= */
00020 
00021 #include <utility>
00022 #include <iostream>
00023 #include <fstream>
00024 #include <string>
00025 #include <algorithm>
00026 #include <vector>
00027 #include "viennacl/ocl/backend.hpp"
00028 #include "viennacl/tools/tools.hpp"
00029 
00036 namespace viennacl
00037 {
00038     namespace linalg
00039     {
00040       namespace detail
00041       {
00042         namespace spai
00043         {
00044 
00049           class block_matrix
00050           {
00051             public:
00052 
00056               viennacl::ocl::handle<cl_mem>& handle(){ return elements_; }
00060               viennacl::ocl::handle<cl_mem>& handle1() { return matrix_dimensions_; }
00064               viennacl::ocl::handle<cl_mem>& handle2() { return start_block_inds_; }
00065 
00069               const viennacl::ocl::handle<cl_mem>& handle() const { return elements_; }
00073               const viennacl::ocl::handle<cl_mem>& handle1() const { return matrix_dimensions_; }
00077               const viennacl::ocl::handle<cl_mem>& handle2() const { return start_block_inds_; }
00078             private:
00079               viennacl::ocl::handle<cl_mem> elements_;
00080               viennacl::ocl::handle<cl_mem> matrix_dimensions_;
00081               viennacl::ocl::handle<cl_mem> start_block_inds_;
00082           };
00083 
00084 
00085         }
00086       }
00087     }
00088 }
00089 #endif