52 detail::use_builtin_matrix_ops<Matrix>::value &&
53 math::static_rows<typename value_type<Matrix>::type>::value == math::static_rows<typename value_type<Vector1>::type>::value &&
54 math::static_rows<typename value_type<Matrix>::type>::value == math::static_rows<typename value_type<Vector2>::type>::value>>
56 static void apply(Alpha alpha,
const Matrix& A,
const Vector1& x, Beta beta,
Vector2& y)
58 typedef typename value_type<Vector2>::type V;
60 const ptrdiff_t n =
static_cast<ptrdiff_t
>(nbRow(A));
63 if (!math::is_zero(beta)) {
64 for (ptrdiff_t i = begin; i < (begin + size); ++i) {
65 V sum = math::zero<V>();
66 for (
typename row_iterator<Matrix>::type a = row_begin(A, i); a; ++a)
67 sum += a.value() * x[a.col()];
68 y[i] = alpha * sum + beta * y[i];
72 for (ptrdiff_t i = begin; i < (begin + size); ++i) {
73 V sum = math::zero<V>();
74 for (
typename row_iterator<Matrix>::type a = row_begin(A, i); a; ++a)
75 sum += a.value() * x[a.col()];
88 std::enable_if_t<detail::use_builtin_matrix_ops<Matrix>::value &&
89 math::static_rows<typename value_type<Matrix>::type>::value == math::static_rows<typename value_type<Vector1>::type>::value &&
90 math::static_rows<typename value_type<Matrix>::type>::value == math::static_rows<typename value_type<Vector2>::type>::value &&
91 math::static_rows<typename value_type<Matrix>::type>::value == math::static_rows<typename value_type<Vector3>::type>::value>>
93 static void apply(Vector1
const& rhs,
98 typedef typename value_type<Vector3>::type V;
99 const ptrdiff_t n =
static_cast<ptrdiff_t
>(nbRow(A));
102 for (ptrdiff_t i = begin; i < (begin+size); ++i) {
103 V sum = math::zero<V>();
104 for (
typename row_iterator<Matrix>::type a = row_begin(A, i); a; ++a)
105 sum += a.value() * x[a.col()];
106 res[i] = rhs[i] - sum;
120 std::enable_if_t<detail::use_builtin_matrix_ops<Matrix>::value &&
121 (math::static_rows<typename value_type<Matrix>::type>::value != math::static_rows<typename value_type<Vector1>::type>::value ||
122 math::static_rows<typename value_type<Matrix>::type>::value != math::static_rows<typename value_type<Vector2>::type>::value)>>
124 static void apply(Alpha alpha,
const Matrix& A,
const Vector1& x, Beta beta,
Vector2& y)
126 typedef typename value_type<Matrix>::type V;
128 auto X = backend::reinterpret_as_rhs<V>(x);
129 auto Y = backend::reinterpret_as_rhs<V>(y);
131 spmv(alpha, A, X, beta, Y);
140 std::enable_if_t<detail::use_builtin_matrix_ops<Matrix>::value &&
141 (math::static_rows<typename value_type<Matrix>::type>::value != math::static_rows<typename value_type<Vector1>::type>::value ||
142 math::static_rows<typename value_type<Matrix>::type>::value != math::static_rows<typename value_type<Vector2>::type>::value ||
143 math::static_rows<typename value_type<Matrix>::type>::value != math::static_rows<typename value_type<Vector3>::type>::value)>>
145 static void apply(Vector1
const& f,
150 typedef typename value_type<Matrix>::type V;
152 auto X = backend::reinterpret_as_rhs<V>(x);
153 auto F = backend::reinterpret_as_rhs<V>(f);
154 auto R = backend::reinterpret_as_rhs<V>(r);
156 residual(F, A, X, R);
void arccoreParallelFor(const ComplexForLoopRanges< RankValue > &loop_ranges, const ForLoopRunInfo &run_info, const LambdaType &lambda_function, const ReducerArgs &... reducer_args)
Applique en concurrence la fonction lambda lambda_function sur l'intervalle d'itération donné par loo...