Debian Codegraph @

packages/kokkos-kernels/blas/tpls/KokkosBlas_magma.hpp

raw
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 KOKKOSBLAS_MAGMA_HPP_
18 #define KOKKOSBLAS_MAGMA_HPP_
19
20 // If LAPACK TPL is enabled, it is preferred over magma's LAPACK
21 #ifdef KOKKOSKERNELS_ENABLE_TPL_MAGMA
22 #include "magma_v2.h"
23
24 namespace KokkosBlas {
25 namespace Impl {
26
27 struct MagmaSingleton {
28 MagmaSingleton();
29
30 static bool is_initialized();
31 static MagmaSingleton& singleton();
32
33 private:
34 static std::unique_ptr<MagmaSingleton>& get_instance();
35 };
36
37 } // namespace Impl
38 } // namespace KokkosBlas
39 #endif // KOKKOSKERNELS_ENABLE_TPL_MAGMA
40
41 #endif // KOKKOSBLAS_MAGMA_HPP_