| 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 KOKKOSBLAS1_NRMINF_TPL_SPEC_AVAIL_HPP_ |
| 18 |
#define KOKKOSBLAS1_NRMINF_TPL_SPEC_AVAIL_HPP_ |
| 19 |
|
| 20 |
namespace KokkosBlas { |
| 21 |
namespace Impl { |
| 22 |
// Specialization struct which defines whether a specialization exists |
| 23 |
template <class execution_space, class AV, class XMV, int Xrank = XMV::rank> |
| 24 |
struct nrminf_tpl_spec_avail { |
| 25 |
enum : bool { value = false }; |
| 26 |
}; |
| 27 |
} // namespace Impl |
| 28 |
} // namespace KokkosBlas |
| 29 |
|
| 30 |
namespace KokkosBlas { |
| 31 |
namespace Impl { |
| 32 |
|
| 33 |
// Generic Host side BLAS (could be MKL or whatever) |
| 34 |
#ifdef KOKKOSKERNELS_ENABLE_TPL_BLAS |
| 35 |
// double |
| 36 |
#define KOKKOSBLAS1_NRMINF_TPL_SPEC_AVAIL_BLAS(SCALAR, LAYOUT, MEMSPACE) \ |
| 37 |
template <class ExecSpace> \ |
| 38 |
struct nrminf_tpl_spec_avail<ExecSpace, \ |
| 39 |
Kokkos::View<typename Kokkos::Details::InnerProductSpaceTraits<SCALAR>::mag_type, \ |
| 40 |
LAYOUT, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \ |
| 41 |
Kokkos::View<const SCALAR*, LAYOUT, Kokkos::Device<ExecSpace, MEMSPACE>, \ |
| 42 |
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \ |
| 43 |
1> { \ |
| 44 |
enum : bool { value = true }; \ |
| 45 |
}; |
| 46 |
|
| 47 |
KOKKOSBLAS1_NRMINF_TPL_SPEC_AVAIL_BLAS(double, Kokkos::LayoutLeft, Kokkos::HostSpace) |
| 48 |
KOKKOSBLAS1_NRMINF_TPL_SPEC_AVAIL_BLAS(float, Kokkos::LayoutLeft, Kokkos::HostSpace) |
| 49 |
KOKKOSBLAS1_NRMINF_TPL_SPEC_AVAIL_BLAS(Kokkos::complex<double>, Kokkos::LayoutLeft, Kokkos::HostSpace) |
| 50 |
KOKKOSBLAS1_NRMINF_TPL_SPEC_AVAIL_BLAS(Kokkos::complex<float>, Kokkos::LayoutLeft, Kokkos::HostSpace) |
| 51 |
|
| 52 |
#endif |
| 53 |
|
| 54 |
} // namespace Impl |
| 55 |
} // namespace KokkosBlas |
| 56 |
#endif |