diff --git a/src/cuda/api/memory.hpp b/src/cuda/api/memory.hpp index 2a92d56a..d1b041e4 100644 --- a/src/cuda/api/memory.hpp +++ b/src/cuda/api/memory.hpp @@ -632,6 +632,33 @@ inline void copy(span destination, const T(&source)[N], optional_ref +void foo(T(&destination)[N]) +{ + (void) destination; + return; +} + +template <> +void foo(int(&destination)[10]); + +template +void foo2(span source) { } + +template<> +void foo2(span source); + +template +void foo3(T(&destination)[N], span source) {} + +template <> +void foo3(int(&destination)[10], span source); + +#ifdef _MSC_VER +template +using c_array = T[N]; +#endif + /** * Copy the contents of a span into a C-style array * @@ -641,8 +668,13 @@ inline void copy(span destination, const T(&source)[N], optional_ref void copy(T(&destination)[N], span source, optional_ref stream = {}) +#else +template +void copy(c_array& destination, span source, optional_ref stream = {}) +#endif { #ifndef NDEBUG if (source.size() > N) {