From 6b129d43cff8352db0d229d2ff92647d65c95902 Mon Sep 17 00:00:00 2001 From: unexploredtest Date: Wed, 7 Apr 2021 09:37:27 +0430 Subject: [PATCH] Fixed C++ example's syntax error --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 30680a636..85ce9e49f 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ void kompute(const std::string& shader) { ->eval(); // Evaluates only last recorded operation // 5. Sync results from the GPU asynchronously - sq = mgr.sequence() + auto sq = mgr.sequence(); sq->evalAsync(params); // ... Do other work asynchronously whilst GPU finishes @@ -96,9 +96,9 @@ void kompute(const std::string& shader) { sq->evalAwait(); // Prints the first output which is: { 4, 8, 12 } - for (const float& elem : tensorOutA->data()) std::cout << elem << " "; + for (const float& elem : tensorOutA->vector()) std::cout << elem << " "; // Prints the second output which is: { 10, 10, 10 } - for (const float& elem : tensorOutB->data()) std::cout << elem << " "; + for (const float& elem : tensorOutB->vector()) std::cout << elem << " "; } // Manages / releases all CPU and GPU memory resources