| 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 |
|
| 17 |
#ifndef KOKKOSLAPACK_HOST_TPL_HPP_ |
| 18 |
#define KOKKOSLAPACK_HOST_TPL_HPP_ |
| 19 |
|
| 20 |
/// \file KokkosLapack_Host_tpl.hpp |
| 21 |
/// \brief LAPACK wrapper |
| 22 |
|
| 23 |
#include "KokkosKernels_config.h" |
| 24 |
#include "Kokkos_ArithTraits.hpp" |
| 25 |
|
| 26 |
#if defined(KOKKOSKERNELS_ENABLE_TPL_LAPACK) |
| 27 |
|
| 28 |
namespace KokkosLapack { |
| 29 |
namespace Impl { |
| 30 |
|
| 31 |
template <typename T> |
| 32 |
struct HostLapack { |
| 33 |
static void gesv(int n, int rhs, T *a, int lda, int *ipiv, T *b, int ldb, int info); |
| 34 |
|
| 35 |
static void gesvd(const char jobu, const char jobvt, const int m, const int n, T *A, const int lda, |
| 36 |
typename Kokkos::ArithTraits<T>::mag_type *S, T *U, const int ldu, T *Vt, const int ldvt, T *work, |
| 37 |
int lwork, typename Kokkos::ArithTraits<T>::mag_type *rwork, int info); |
| 38 |
|
| 39 |
static int trtri(const char uplo, const char diag, int n, const T *a, int lda); |
| 40 |
}; |
| 41 |
} // namespace Impl |
| 42 |
} // namespace KokkosLapack |
| 43 |
|
| 44 |
#endif // KOKKOSKERNELS_ENABLE_TPL_LAPACK |
| 45 |
|
| 46 |
#endif // KOKKOSLAPACK_HOST_TPL_HPP_ |