Skip to content

Commit f77c66b

Browse files
committed
ETI: adding more decl files to eti
Now all the sparse kernels have an ETI decl file to prevent multiple template instantiation.
1 parent ea899a3 commit f77c66b

File tree

33 files changed

+464
-16
lines changed

33 files changed

+464
-16
lines changed

cmake/kokkoskernels_eti.cmake

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,13 @@ MACRO(KOKKOSKERNELS_GENERATE_ETI FUNCTION_NAME SUBFOLDER)
177177

178178
LIST(APPEND ${ETI_HEADER_LIST} ${CMAKE_CURRENT_BINARY_DIR}/${AVAIL_HEADER})
179179

180-
STRING(FIND "Sparse_sptrsv_symbolic;Sparse_sptrsv_solve;Sparse_trsv;Sparse_spmv;Sparse_spmv_mv;Sparse_spmv_bsrmatrix;Sparse_spmv_mv_bsrmatrix" ${FUNCTION_NAME} DO_DECL)
181-
IF(DO_DECL GREATER -1)
182-
SET(DECL_HEADER "${ETI_COMPONENTS}/eti/generated_specializations_hpp/Kokkos${FUNCTION_NAME}_eti_spec_decl.hpp")
183-
SET(DECL_TEMPLATE "${DECL_HEADER}.in")
180+
SET(DECL_HEADER "${ETI_COMPONENTS}/eti/generated_specializations_hpp/Kokkos${FUNCTION_NAME}_eti_spec_decl.hpp")
181+
SET(DECL_TEMPLATE "${DECL_HEADER}.in")
184182

185-
STRING(REPLACE ";" "\n" ${UPPER_NAME}_ETI_DECL_BLOCK "${${UPPER_NAME}_ETI_DECL_LIST}")
183+
STRING(REPLACE ";" "\n" ${UPPER_NAME}_ETI_DECL_BLOCK "${${UPPER_NAME}_ETI_DECL_LIST}")
186184

187-
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${DECL_TEMPLATE}
188-
${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER})
185+
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${DECL_TEMPLATE}
186+
${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER})
189187

190-
LIST(APPEND ${ETI_HEADER_LIST} ${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER})
191-
ENDIF()
188+
LIST(APPEND ${ETI_HEADER_LIST} ${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER})
192189
ENDMACRO(KOKKOSKERNELS_GENERATE_ETI)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 KOKKOSSPARSE_BSPGEMM_NUMERIC_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_BSPGEMM_NUMERIC_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
@SPARSE_BSPGEMM_NUMERIC_ETI_DECL_BLOCK@
22+
} //IMPL
23+
} //Kokkos
24+
#endif
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 KOKKOSSPARSE_GAUSS_SEIDEL_APPLY_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_GAUSS_SEIDEL_APPLY_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
@SPARSE_GAUSS_SEIDEL_APPLY_ETI_DECL_BLOCK@
22+
} //IMPL
23+
} //Kokkos
24+
#endif
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 KOKKOSSPARSE_GAUSS_SEIDEL_NUMERIC_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_GAUSS_SEIDEL_NUMERIC_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
@SPARSE_GAUSS_SEIDEL_NUMERIC_ETI_DECL_BLOCK@
22+
} //IMPL
23+
} //Kokkos
24+
#endif
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 KOKKOSSPARSE_GAUSS_SEIDEL_SYMBOLIC_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_GAUSS_SEIDEL_SYMBOLIC_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
@SPARSE_GAUSS_SEIDEL_SYMBOLIC_ETI_DECL_BLOCK@
22+
} //IMPL
23+
} //Kokkos
24+
#endif

sparse/eti/generated_specializations_hpp/KokkosSparse_gmres_eti_spec_avail.hpp.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#ifndef KOKKOSSPARSE_GMRES_ETI_SPEC_AVAIL_HPP_
2-
#define KOKKOSSPARSE_GMRES_ETI_SPEC_AVAIL_HPP_
31
/*
42
//@HEADER
53
// ************************************************************************
@@ -18,11 +16,11 @@
1816
//@HEADER
1917
*/
2018

19+
#ifndef KOKKOSSPARSE_GMRES_ETI_SPEC_AVAIL_HPP_
20+
#define KOKKOSSPARSE_GMRES_ETI_SPEC_AVAIL_HPP_
2121
namespace KokkosSparse {
2222
namespace Impl {
23-
2423
@SPARSE_GMRES_ETI_AVAIL_BLOCK@
25-
2624
} // Impl
2725
} // KokkosSparse
2826
#endif // KOKKOSSPARSE_GMRES_ETI_SPEC_AVAIL_HPP_
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
//@HEADER
3+
// ************************************************************************
4+
//
5+
// Kokkos v. 4.0
6+
// Copyright (2022) National Technology & Engineering
7+
// Solutions of Sandia, LLC (NTESS).
8+
//
9+
// Under the terms of Contract DE-NA0003525 with NTESS,
10+
// the U.S. Government retains certain rights in this software.
11+
//
12+
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
13+
// See https://kokkos.org/LICENSE for license information.
14+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
15+
//
16+
//@HEADER
17+
*/
18+
19+
#ifndef KOKKOSSPARSE_GMRES_ETI_SPEC_DECL_HPP_
20+
#define KOKKOSSPARSE_GMRES_ETI_SPEC_DECL_HPP_
21+
namespace KokkosSparse {
22+
namespace Impl {
23+
@SPARSE_GMRES_ETI_DECL_BLOCK@
24+
} // Impl
25+
} // KokkosSparse
26+
#endif // KOKKOSSPARSE_GMRES_ETI_SPEC_DECL_HPP_
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 KOKKOSSPARSE_PAR_ILUT_NUMERIC_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_PAR_ILUT_NUMERIC_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
22+
@SPARSE_PAR_ILUT_NUMERIC_ETI_DECL_BLOCK@
23+
24+
} // Impl
25+
} // KokkosSparse
26+
#endif // KOKKOSSPARSE_PAR_ILUT_NUMERIC_ETI_SPEC_DECL_HPP_
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 KOKKOSSPARSE_PAR_ILUT_SYMBOLIC_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_PAR_ILUT_SYMBOLIC_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
22+
@SPARSE_PAR_ILUT_SYMBOLIC_ETI_DECL_BLOCK@
23+
24+
} // Impl
25+
} // KokkosSparse
26+
#endif // KOKKOSSPARSE_PAR_ILUT_SYMBOLIC_ETI_SPEC_DECL_HPP_
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 KOKKOSSPARSE_SPADD_NUMERIC_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_SPADD_NUMERIC_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
@SPARSE_SPADD_NUMERIC_ETI_DECL_BLOCK@
22+
} //IMPL
23+
} //Kokkos
24+
#endif
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 KOKKOSSPARSE_SPADD_SYMBOLIC_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_SPADD_SYMBOLIC_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
@SPARSE_SPADD_SYMBOLIC_ETI_DECL_BLOCK@
22+
} //IMPL
23+
} //Kokkos
24+
#endif
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 KOKKOSSPARSE_SPGEMM_JACOBI_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_SPGEMM_JACOBI_ETI_SPEC_DECL_HPP_
19+
20+
namespace KokkosSparse {
21+
namespace Impl {
22+
@SPARSE_SPGEMM_JACOBI_ETI_DECL_BLOCK@
23+
} //IMPL
24+
} //Kokkos
25+
#endif
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 KOKKOSSPARSE_SPGEMM_NOREUSE_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_SPGEMM_NOREUSE_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
@SPARSE_SPGEMM_NOREUSE_ETI_DECL_BLOCK@
22+
} //IMPL
23+
} //Kokkos
24+
#endif
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 KOKKOSSPARSE_SPGEMM_NUMERIC_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_SPGEMM_NUMERIC_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
@SPARSE_SPGEMM_NUMERIC_ETI_DECL_BLOCK@
22+
} //IMPL
23+
} //Kokkos
24+
#endif
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 KOKKOSSPARSE_SPGEMM_SYMBOLIC_ETI_SPEC_DECL_HPP_
18+
#define KOKKOSSPARSE_SPGEMM_SYMBOLIC_ETI_SPEC_DECL_HPP_
19+
namespace KokkosSparse {
20+
namespace Impl {
21+
@SPARSE_SPGEMM_SYMBOLIC_ETI_DECL_BLOCK@
22+
} //IMPL
23+
} //Kokkos
24+
#endif

0 commit comments

Comments
 (0)