00001 #ifndef VIENNACL_LINALG_DETAIL_SPAI_BLOCK_MATRIX_HPP 00002 #define VIENNACL_LINALG_DETAIL_SPAI_BLOCK_MATRIX_HPP 00003 00004 /* ========================================================================= 00005 Copyright (c) 2010-2011, Institute for Microelectronics, 00006 Institute for Analysis and Scientific Computing, 00007 TU Wien. 00008 00009 ----------------- 00010 ViennaCL - The Vienna Computing Library 00011 ----------------- 00012 00013 Project Head: Karl Rupp rupp@iue.tuwien.ac.at 00014 00015 (A list of authors and contributors can be found in the PDF manual) 00016 00017 License: MIT (X11), see file LICENSE in the base directory 00018 ============================================================================= */ 00019 00020 #include <utility> 00021 #include <iostream> 00022 #include <fstream> 00023 #include <string> 00024 #include <algorithm> 00025 #include <vector> 00026 #include "viennacl/ocl/backend.hpp" 00027 #include "viennacl/tools/tools.hpp" 00028 00035 namespace viennacl 00036 { 00037 namespace linalg 00038 { 00039 namespace detail 00040 { 00041 namespace spai 00042 { 00043 00048 class block_matrix{ 00049 public: 00050 block_matrix(){ 00051 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 //unsigned int _vectorIndex; 00080 viennacl::ocl::handle<cl_mem> _elements; 00081 viennacl::ocl::handle<cl_mem> _matrix_dimensions; 00082 viennacl::ocl::handle<cl_mem> _start_block_inds; 00083 }; 00084 00085 00086 } 00087 } 00088 } 00089 } 00090 #endif