From 5892d5ea94ec853994f66432d1ab27260434428f Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sat, 22 Aug 2020 18:50:06 +0100 Subject: [PATCH] Updated readme --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e0ae774f4..f69f72203 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,22 @@ Use default equations ```c++ int main() { - kp::Manager kManager; // Chooses device 0 unless specified - kp::Tensor inputOne = kp::Tensor({0, 1, 2, 3}); + kp::Manager mgr; // Automatically selects Device 0 - kp::Tensor inputTwo; - inputTwo = kManager.eval(&inputTwo); + std::shared_ptr tensorLHS{ new kp::Tensor({ 0.0, 1.0, 2.0 }) }; + mgr.evalOp({ tensorLHS }); - kp::Tensor output = kManager.eval(inputOne, inputTwo); + std::shared_ptr tensorRHS{ new kp::Tensor( { 2.0, 4.0, 6.0 }) }; + mgr.evalOp({ tensorRHS }); - std::cout << output << std::endl; + // TODO: Add capabilities for just output tensor types + std::shared_ptr tensorOutput{ new kp::Tensor({ 0.0, 0.0, 0.0 }) }; + mgr.evalOp({ tensorOutput }); + + mgr.evalOp({ tensorLHS, tensorRHS, tensorOutput }); + + std::cout << fmt::format("Output: {}", tensorOutput.data()) << std::endl; } ```