From cb1d813d7abcc7797d39435b673c3c624f292102 Mon Sep 17 00:00:00 2001 From: "Mads R. B. Kristensen" Date: Fri, 4 Aug 2023 15:28:37 +0200 Subject: [PATCH] fixes #254 --- cpp/examples/basic_io.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/examples/basic_io.cpp b/cpp/examples/basic_io.cpp index bbae854ddb..e1fb550fc6 100644 --- a/cpp/examples/basic_io.cpp +++ b/cpp/examples/basic_io.cpp @@ -119,12 +119,12 @@ int main() { kvikio::FileHandle f("/tmp/test-file", "r+", kvikio::FileHandle::m644); kvikio::buffer_register(c_dev, SIZE); - size_t read = f.pread(b_dev, SIZE).get(); + size_t read = f.pread(c_dev, SIZE).get(); check(read == SIZE); check(read == f.nbytes()); kvikio::buffer_deregister(c_dev); + cout << "Read buffer registered data: " << read << endl; } - { kvikio::FileHandle f("/tmp/test-file", "w"); size_t written = f.pwrite(a, SIZE).get();