Skip to content

Commit 31c98e6

Browse files
authored
deprecate __KOKKOSBATCHED_ENABLE_LAPACKE__ (kokkos#2450)
In favor of KOKKOSBATCHED_IMPL_ENABLE_LAPACKE Signed-off-by: Carl Pearson <[email protected]>
1 parent d343008 commit 31c98e6

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

batched/KokkosBatched_Util.hpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,24 @@
9898
#endif
9999

100100
#if defined(KOKKOSKERNELS_ENABLE_TPL_LAPACKE)
101-
#define __KOKKOSBATCHED_ENABLE_LAPACKE__ 1
101+
#define KOKKOSBATCHED_IMPL_ENABLE_LAPACKE 1
102+
#if defined(KOKKOS_COMPILER_MSVC)
103+
#define __KOKKOSBATCHED_ENABLE_LAPACKE__ \
104+
( \
105+
__pragma(message("warning: __KOKKOSBATCHED_ENABLE_LAPACKE__ is deprecated and will be " \
106+
"removed in a future version")) KOKKOSBATCHED_IMPL_ENABLE_LAPACKE)
107+
#elif defined(KOKKOS_COMPILER_GNU) || defined(KOKKOS_COMPILER_CLANG)
108+
#define __KOKKOSBATCHED_ENABLE_LAPACKE__ \
109+
(__extension__({ \
110+
_Pragma( \
111+
"\"__KOKKOSBATCHED_ENABLE_LAPACKE__ is deprecated and will be removed in a future " \
112+
"version\""); \
113+
KOKKOSBATCHED_IMPL_ENABLE_LAPACKE; \
114+
}))
115+
#else
116+
#define __KOKKOSBATCHED_ENABLE_LAPACKE__ KOKKOSBATCHED_IMPL_ENABLE_LAPACKE // no good way to deprecate?
117+
#endif
118+
102119
#include "lapacke.h"
103120
#endif
104121

batched/dense/impl/KokkosBatched_Eigendecomposition_Serial_Internal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ struct SerialEigendecompositionInternal {
338338
inline static int host_invoke(const int m, RealType* A, const int as0, const int as1, RealType* er, const int ers,
339339
RealType* ei, const int eis, RealType* UL, const int uls0, const int uls1, RealType* UR,
340340
const int urs0, const int urs1, RealType* w, const int wlen) {
341-
#if defined(__KOKKOSBATCHED_ENABLE_LAPACKE__) || defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL)
341+
#if defined(KOKKOSBATCHED_IMPL_ENABLE_LAPACKE) || defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL)
342342
int matrix_layout(0), lda(0), uls(0), urs(0);
343343
if (as0 == 1) {
344344
assert(uls0 == 1 && "UL is not column major");

0 commit comments

Comments
 (0)