Skip to content

Commit bc8a06c

Browse files
committed
MAINT: deal with cuda::std::invoke_result not available in CuPy
1 parent 2c0dad3 commit bc8a06c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

include/xsf/config.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,13 @@ using enable_if = cuda::std::enable_if<Cond, T>;
210210
template <typename T>
211211
using decay = cuda::std::decay<T>;
212212

213-
template <typename T>
214-
using invoke_result = cuda::std::invoke_result<T>;
213+
template <typename F>
214+
struct invoke_result {
215+
using type = decltype(cuda::std::declval<F>()());
216+
};
217+
218+
template <typename F>
219+
using invoke_result_t = typename invoke_result<F>::type;
215220

216221
template <typename T1, typename T2>
217222
using pair = cuda::std::pair<T1, T2>;

0 commit comments

Comments
 (0)