Updated example up to date

This commit is contained in:
Alejandro Saucedo 2020-08-31 16:06:10 +01:00
parent 08a1300450
commit a379feb77a

View file

@ -55,9 +55,9 @@ int main() {
kp::Manager mgr; // Automatically selects Device 0
// Create 3 tensors of default type float
auto tensorLhs = std::make_shared<kp::Tensor<>>(kp::Tensor<>({ 0., 1., 2. }));
auto tensorRhs = std::make_shared<kp::Tensor<>>(kp::Tensor<>({ 2., 4., 6. }));
auto tensorOut = std::make_shared<kp::Tensor<>>(kp::Tensor<>({ 0., 0., 0. }));
auto tensorLhs = std::make_shared<kp::Tensor>(kp::Tensor({ 0., 1., 2. }));
auto tensorRhs = std::make_shared<kp::Tensor>(kp::Tensor({ 2., 4., 6. }));
auto tensorOut = std::make_shared<kp::Tensor>(kp::Tensor({ 0., 0., 0. }));
// Create tensor data in GPU
mgr.evalOpDefault<kp::OpCreateTensor>({ tensorLhs, tensorRhs, tensorOut });