| 1 |
//@HEADER |
| 2 |
// ************************************************************************ |
| 3 |
// |
| 4 |
// Kokkos v. 4.0 |
| 5 |
// Copyright (2022) National Technology & Engineering |
| 6 |
// Solutions of Sandia, LLC (NTESS). |
| 7 |
// |
| 8 |
// Under the terms of Contract DE-NA0003525 with NTESS, |
| 9 |
// the U.S. Government retains certain rights in this software. |
| 10 |
// |
| 11 |
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. |
| 12 |
// See https://kokkos.org/LICENSE for license information. |
| 13 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 14 |
// |
| 15 |
//@HEADER |
| 16 |
#ifndef KOKKOSBATCHED_LASWP_HPP_ |
| 17 |
#define KOKKOSBATCHED_LASWP_HPP_ |
| 18 |
|
| 19 |
#include <KokkosBatched_Util.hpp> |
| 20 |
|
| 21 |
/// \author Yuuichi Asahi ([email protected]) |
| 22 |
|
| 23 |
namespace KokkosBatched { |
| 24 |
|
| 25 |
/// \brief Serial Batched Laswp: |
| 26 |
/// |
| 27 |
/// performs a series of row interchanges on the matrix A. |
| 28 |
/// One row interchange is initiated for each of rows K1 through K2 of A. |
| 29 |
/// |
| 30 |
/// \tparam PivViewType: Input type for the a superdiagonal matrix, needs to |
| 31 |
/// be a 1D view |
| 32 |
/// \tparam AViewType: Input type for the vector or matrix, needs to be a 1D or |
| 33 |
/// 2D view |
| 34 |
/// |
| 35 |
/// \param piv [in]: The pivot indices; for 0 <= i < N, row i of the |
| 36 |
/// matrix was interchanged with row piv(i). |
| 37 |
/// \param A [inout]: A is a lda by n matrix. The matrix of column dimension N |
| 38 |
/// to which the row interchanges will be applied. |
| 39 |
/// |
| 40 |
/// No nested parallel_for is used inside of the function. |
| 41 |
/// |
| 42 |
|
| 43 |
template <typename ArgDirect> |
| 44 |
struct SerialLaswp { |
| 45 |
template <typename PivViewType, typename AViewType> |
| 46 |
KOKKOS_INLINE_FUNCTION static int invoke(const PivViewType &piv, const AViewType &A); |
| 47 |
}; |
| 48 |
} // namespace KokkosBatched |
| 49 |
|
| 50 |
#include "KokkosBatched_Laswp_Serial_Impl.hpp" |
| 51 |
|
| 52 |
#endif // KOKKOSBATCHED_LASWP_HPP_ |