From 9ab1bf24e2c0107aa7fbc5018ea93f45c6408bb2 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Mon, 23 May 2022 12:45:22 +0200 Subject: [PATCH] Fix API inconsistency in cupp11.hpp The function `CopyToAsync` has an optional event argument in the OpenCL version, which is used in CLBlast. This makes the code not compile at all if CUDA (through cupp11.hpp`) is used as backend. This issue was found by a CLBlast user and reported privately by email. This PR should fix that. --- src/cupp11.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cupp11.hpp b/src/cupp11.hpp index ce765844..edcdc12f 100644 --- a/src/cupp11.hpp +++ b/src/cupp11.hpp @@ -647,7 +647,8 @@ public: } // Copies the contents of this buffer into another device buffer - void CopyToAsync(const Queue &queue, const size_t size, const Buffer &destination) const { + void CopyToAsync(const Queue &queue, const size_t size, const Buffer &destination, + EventPointer event = nullptr) const { CheckError(cuMemcpyDtoDAsync(destination(), *buffer_, size*sizeof(T), queue())); } void CopyTo(const Queue &queue, const size_t size, const Buffer &destination) const {