33 #ifndef SHARK_LINALG_BLAS_ASSIGNMENT_HPP 34 #define SHARK_LINALG_BLAS_ASSIGNMENT_HPP 38 #include "detail/traits.hpp" 48 template<
class VecX,
class VecV>
52 template<
class VecX,
class VecV>
56 template<
class VecX,
class VecV>
58 kernels::assign<scalar_plus_assign> (x, v);
60 template<
class VecX,
class VecV>
62 v().plus_assign_to(x);
64 template<
class VecX,
class VecV>
66 kernels::assign<scalar_minus_assign> (x, v);
68 template<
class VecX,
class VecV>
70 v().minus_assign_to(x);
72 template<
class VecX,
class VecV>
74 kernels::assign<scalar_multiply_assign> (x, v);
76 template<
class VecX,
class VecV>
78 typename vector_temporary<VecX>::type temporary(v);
79 kernels::assign<scalar_multiply_assign> (x, temporary);
81 template<
class VecX,
class VecV>
83 kernels::assign<scalar_divide_assign> (x, v);
85 template<
class VecX,
class VecV>
87 typename vector_temporary<VecX>::type temporary(v);
88 kernels::assign<scalar_divide_assign> (x, temporary);
97 template<
class VecX,
class VecV>
108 template<
class VecX,
class VecV>
119 template<
class VecX,
class VecV>
130 template<
class VecX,
class VecV>
141 template<
class VecX,
class VecV>
153 template<
class MatA,
class MatB>
157 template<
class MatA,
class MatB>
161 template<
class MatA,
class MatB>
163 kernels::assign<scalar_plus_assign> (A, B);
165 template<
class MatA,
class MatB>
167 B().plus_assign_to(A);
169 template<
class MatA,
class MatB>
171 kernels::assign<scalar_minus_assign> (A, B);
173 template<
class MatA,
class MatB>
175 B().minus_assign_to(A);
177 template<
class MatA,
class MatB>
179 kernels::assign<scalar_multiply_assign> (A, B);
181 template<
class MatA,
class MatB>
183 typename matrix_temporary<MatA>::type temporary(B);
184 kernels::assign<scalar_multiply_assign> (A, B);
186 template<
class MatA,
class MatB>
188 kernels::assign<scalar_divide_assign> (A, B);
190 template<
class MatA,
class MatB>
192 typename matrix_temporary<MatA>::type temporary(B);
193 kernels::assign<scalar_divide_assign> (A, B);
202 template<
class MatA,
class MatB>
214 template<
class MatA,
class MatB>
226 template<
class MatA,
class MatB>
238 template<
class MatA,
class MatB>
250 template<
class MatA,
class MatB>
268 template<
class VecX,
class VecV>
271 typename vector_temporary<VecX>::type temporary(v);
281 template<
class VecX,
class VecV>
284 typename vector_temporary<VecX>::type temporary(v);
294 template<
class VecX,
class VecV>
297 typename vector_temporary<VecX>::type temporary(v);
307 template<
class VecX,
class VecV>
310 typename vector_temporary<VecX>::type temporary(v);
319 kernels::assign<scalar_plus_assign> (x, t);
328 kernels::assign<scalar_minus_assign> (x, t);
337 kernels::assign<scalar_multiply_assign> (x, t);
346 kernels::assign<scalar_divide_assign> (x, t);
362 template<
class MatA,
class MatB>
366 typename matrix_temporary<MatA>::type temporary(B);
376 template<
class MatA,
class MatB>
380 typename matrix_temporary<MatA>::type temporary(B);
390 template<
class MatA,
class MatB>
394 typename matrix_temporary<MatA>::type temporary(B);
404 template<
class MatA,
class MatB>
408 typename matrix_temporary<MatA>::type temporary(B);
417 kernels::assign<scalar_plus_assign> (A, t);
426 kernels::assign<scalar_minus_assign> (A, t);
435 kernels::assign<scalar_multiply_assign> (A, t);
444 kernels::assign<scalar_divide_assign> (A, t);
454 template<
class T,
class U>
456 static_cast<T&
>(x) += arg;
459 template<
class T,
class U>
461 static_cast<T&
>(x) -= arg;
464 template<
class T,
class U>
466 static_cast<T&
>(x) *= arg;
469 template<
class T,
class U>
471 static_cast<T&
>(x) /= arg;
483 typedef typename C::closure_type closure_type;
484 typedef typename C::scalar_type scalar_type;
491 closure_type &operator= (
const E &e) {
576 typename boost::mpl::eval_if<
578 typename E::evaluation_category,
582 boost::mpl::identity<E const&>
593 typename boost::mpl::eval_if<
595 typename E::evaluation_category,
599 boost::mpl::identity<E const&>