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.
pull/438/head
Cedric Nugteren 2022-05-23 12:45:22 +02:00 committed by GitHub
parent 6b358e1be9
commit 9ab1bf24e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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<T> &destination) const {
void CopyToAsync(const Queue &queue, const size_t size, const Buffer<T> &destination,
EventPointer event = nullptr) const {
CheckError(cuMemcpyDtoDAsync(destination(), *buffer_, size*sizeof(T), queue()));
}
void CopyTo(const Queue &queue, const size_t size, const Buffer<T> &destination) const {