Debian Codegraph @

packages/kokkos-kernels/batched/dense/src/KokkosBatched_InnerGemmFixB_Decl.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 #ifndef KOKKOSBATCHED_INNER_GEMM_FIX_B_DECL_HPP
17 #define KOKKOSBATCHED_INNER_GEMM_FIX_B_DECL_HPP
18
19 /// \author Kyungjoo Kim ([email protected])
20
21 namespace KokkosBatched {
22
23 template <int mb, int nb>
24 struct InnerGemmFixB {
25 const int _as0, _as1, _bs0, _bs1, _cs0, _cs1;
26
27 KOKKOS_INLINE_FUNCTION
28 InnerGemmFixA(const int as0, const int as1, const int bs0, const int bs1, const int cs0, const int cs1)
29 : _as0(as0), _as1(as1), _bs0(bs0), _bs1(bs1), _cs0(cs0), _cs1(cs1) {}
30
31 // serial rank update
32 template <typename ScalarType, typename ValueType>
33 KOKKOS_INLINE_FUNCTION int serial_invoke(const ScalarType alpha, const ValueType *KOKKOS_RESTRICT A,
34 const ValueType *KOKKOS_RESTRICT B, const int n,
35 /**/ ValueType *KOKKOS_RESTRICT C);
36
37 // serial rank update for remainder
38 template <typename ScalarType, typename ValueType>
39 KOKKOS_INLINE_FUNCTION int serial_invoke(const ScalarType alpha, const ValueType *KOKKOS_RESTRICT A,
40 const ValueType *KOKKOS_RESTRICT B, const int m, const int n, const int k,
41 /**/ ValueType *KOKKOS_RESTRICT C);
42 };
43 } // namespace KokkosBatched
44
45 #endif