ViennaCL - The Vienna Computing Library  1.5.1
viennacl/linalg/detail/spai/block_vector.hpp
Go to the documentation of this file.
00001 #ifndef VIENNACL_LINALG_DETAIL_SPAI_BLOCK_VECTOR_HPP
00002 #define VIENNACL_LINALG_DETAIL_SPAI_BLOCK_VECTOR_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_vector
00050           {
00051             public:
00052 
00056               viennacl::ocl::handle<cl_mem>& handle(){ return elements_; }
00060               viennacl::ocl::handle<cl_mem>& handle1() { return start_block_inds_; }
00061 
00065               const viennacl::ocl::handle<cl_mem>& handle() const { return elements_; }
00069               const viennacl::ocl::handle<cl_mem>& handle1() const { return start_block_inds_; }
00070             private:
00071               viennacl::ocl::handle<cl_mem> elements_;
00072               viennacl::ocl::handle<cl_mem> start_block_inds_;
00073           };
00074         }
00075       }
00076     }
00077 }
00078 #endif