| 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_MAGMA_HPP_ |
| 18 |
#define KOKKOSLAPACK_MAGMA_HPP_ |
| 19 |
|
| 20 |
#ifdef KOKKOSKERNELS_ENABLE_TPL_MAGMA |
| 21 |
#include "magma_v2.h" |
| 22 |
|
| 23 |
namespace KokkosLapack { |
| 24 |
namespace Impl { |
| 25 |
|
| 26 |
// Declaration of the singleton for cusolver |
| 27 |
// this is the only header that needs to be |
| 28 |
// included when using cusolverDn. |
| 29 |
struct MagmaSingleton { |
| 30 |
MagmaSingleton(); |
| 31 |
|
| 32 |
static MagmaSingleton& singleton(); |
| 33 |
|
| 34 |
static bool is_initialized(); |
| 35 |
|
| 36 |
private: |
| 37 |
static std::unique_ptr<MagmaSingleton>& get_instance(); |
| 38 |
}; |
| 39 |
|
| 40 |
} // namespace Impl |
| 41 |
} // namespace KokkosLapack |
| 42 |
#endif |
| 43 |
|
| 44 |
#endif // KOKKOSLAPACK_MAGMA_HPP_ |