Updated example up to date
This commit is contained in:
parent
08a1300450
commit
a379feb77a
1 changed files with 3 additions and 3 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue