ViennaCL - The Vienna Computing Library  1.7.1
Free open-source GPU-accelerated linear algebra and solver library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bisect_kernel_calls.hpp
Go to the documentation of this file.
1 #ifndef VIENNACL_LINALG_DETAIL_BISECT_KERNEL_CALLS_HPP_
2 #define VIENNACL_LINALG_DETAIL_BISECT_KERNEL_CALLS_HPP_
3 
4 /* =========================================================================
5  Copyright (c) 2010-2016, 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 manual)
17 
18  License: MIT (X11), see file LICENSE in the base directory
19 ============================================================================= */
20 
30 #include "viennacl/forwards.h"
31 #include "viennacl/scalar.hpp"
32 #include "viennacl/vector.hpp"
34 #include "viennacl/tools/tools.hpp"
38 #include "viennacl/traits/size.hpp"
42 
44 #ifdef VIENNACL_WITH_OPENCL
46 #endif
47 
48 #ifdef VIENNACL_WITH_CUDA
50 #endif
51 
52 namespace viennacl
53 {
54 namespace linalg
55 {
56 namespace detail
57 {
58  template<typename NumericT>
60  const unsigned int mat_size,
61  const NumericT lg, const NumericT ug,
62  const NumericT precision)
63  {
65  {
66 #ifdef VIENNACL_WITH_OPENCL
69  mat_size,
70  lg,ug,
71  precision);
72  break;
73 #endif
74 #ifdef VIENNACL_WITH_CUDA
77  mat_size,
78  lg,ug,
79  precision);
80  break;
81 #endif
83  throw memory_exception("not initialised!");
84  default:
85  throw memory_exception("not implemented");
86  }
87  }
88 
89 
90 
91 
92  template<typename NumericT>
94  const unsigned int mat_size,
95  const NumericT lg, const NumericT ug,
96  const NumericT precision)
97  {
99  {
100 #ifdef VIENNACL_WITH_OPENCL
103  mat_size,
104  lg,ug,
105  precision);
106  break;
107 #endif
108 #ifdef VIENNACL_WITH_CUDA
111  mat_size,
112  lg,ug,
113  precision);
114  break;
115 #endif
117  throw memory_exception("not initialised!");
118  default:
119  throw memory_exception("not implemented");
120  }
121  }
122 
123 
124 
125 
126 
127  template<typename NumericT>
129  const unsigned int mat_size,
130  const NumericT precision)
131  {
133  {
134 #ifdef VIENNACL_WITH_OPENCL
137  mat_size,
138  precision);
139  break;
140 #endif
141 #ifdef VIENNACL_WITH_CUDA
144  mat_size,
145  precision);
146 
147  break;
148 #endif
150  throw memory_exception("not initialised!");
151  default:
152  throw memory_exception("not implemented");
153  }
154  }
155 
156 
157 
158 
159  template<typename NumericT>
161  const unsigned int mat_size,
162  const NumericT precision)
163  {
165  {
166 #ifdef VIENNACL_WITH_OPENCL
169  mat_size,
170  precision);
171  break;
172 #endif
173 #ifdef VIENNACL_WITH_CUDA
176  mat_size,
177  precision);
178  break;
179 #endif
181  throw memory_exception("not initialised!");
182  default:
183  throw memory_exception("not implemented");
184  }
185  }
186 } // namespace detail
187 } // namespace linalg
188 } //namespace viennacl
189 
190 
191 #endif
void bisectLarge(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
void bisectLarge_MultIntervals(const InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
void bisectLargeMultIntervals(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
void bisectLarge(const InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
void bisectSmall(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataSmall< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
Helper structures to simplify variable handling.
Exception class in case of memory errors.
Definition: forwards.h:572
Generic size and resize functionality for different vector and matrix types.
Extracts the underlying OpenCL start index handle from a vector, a matrix, an expression etc...
Various little tools used here and there in ViennaCL.
This file provides the forward declarations for the main types used within ViennaCL.
Determines row and column increments for matrices and matrix proxies.
float NumericT
Definition: bisect.cpp:40
CUDA kernel calls for the bisection algorithm.
In this class the input matrix is stored.
Definition: structs.hpp:53
void bisectLargeOneIntervals(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
Proxy classes for vectors.
void bisectLarge_OneIntervals(const InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
All the predicates used within ViennaCL. Checks for expressions to be vectors, etc.
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
void bisectLarge_OneIntervals(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
void bisectSmall(const InputData< NumericT > &input, ResultDataSmall< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
In this class the data of the result for large matrices is stored.
Definition: structs.hpp:125
void bisectSmall(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataSmall< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
Extracts the underlying OpenCL handle from a vector, a matrix, an expression etc. ...
viennacl::backend::mem_handle & handle(T &obj)
Returns the generic memory handle of an object. Non-const version.
Definition: handle.hpp:41
void bisectLarge_MultIntervals(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
Implementation of the ViennaCL scalar class.
In this class the data of the result for small matrices is stored.
Definition: structs.hpp:96
A collection of compile time type deductions.
OpenCL kernel calls for the bisection algorithm.
Simple enable-if variant that uses the SFINAE pattern.
void bisectLarge(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
memory_types get_active_handle_id() const
Returns an ID for the currently active memory buffer. Other memory buffers might contain old or no da...
Definition: mem_handle.hpp:118
viennacl::vector< NumericT > g_a
device side representation of diagonal
Definition: structs.hpp:60