Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
SYCLBEllPackMatrixMult.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7
8#pragma once
9
10#include <alien/kernels/sycl/SYCLPrecomp.h>
11#include <alien/kernels/sycl/data/SYCLBEllPackMatrix.h>
12#include <alien/kernels/sycl/data/SYCLVector.h>
13
14namespace Alien::SYCLInternal
15{
16
17/*@! Classe amie de SYCLMatrix pour externaliser plus rapidement (mais moins
18 * proprement)
19 * le produit matrice vecteur */
20template <typename ValueT>
22{
23 public:
25 // clang-format off
26 typedef ValueT ValueType;
27 typedef SYCLBEllPackMatrix<ValueType> MatrixType;
28 typedef SYCLVector<ValueType> VectorType;
29 // clang-format on
30
31 public:
33 SYCLBEllPackMatrixMultT(const MatrixType& matrix);
34
37
38 public:
40 void mult(const VectorType& x, VectorType& y) const;
41 void mult(const UniqueArray<Real>& x, UniqueArray<Real>& y) const;
42
43 void addLMult(Real alpha, const VectorType& x, VectorType& y) const;
44 void addUMult(Real alpha, const VectorType& x, VectorType& y) const;
45
46 void multDiag(VectorType const& y,VectorType& z) const;
47
48 void computeDiag(VectorType& y) const;
49 void multDiag(VectorType& y) const;
50
51 void computeInvDiag(VectorType& y) const;
52 void multInvDiag(VectorType& y) const;
53
54 private:
55 void _parallelMult(const VectorType& x, VectorType& y) const;
56 void _parallelMult(const UniqueArray<Real>& x, UniqueArray<Real>& y) const;
57
58 void _seqMult(const VectorType& x, VectorType& y) const;
59 void _seqMult(const UniqueArray<Real>& x, UniqueArray<Real>& y) const;
60
61 private:
62 const MatrixType& m_matrix_impl;
63};
64
65} // namespace Alien::SYCLInternal
66
67#include "SYCLBEllPackMatrixMultT.h"
void mult(const VectorType &x, VectorType &y) const
Matrix vector product.
virtual ~SYCLBEllPackMatrixMultT()
Destructeur de la classe.
SYCLBEllPackMatrixMultT(const MatrixType &matrix)
Constructeur de la classe.