Don't use make_unique to create shared_ptr (#902)

The code compiled because shared_ptr's constructor actually accepts
unique_ptr.
This commit is contained in:
Cheng
2024-03-27 22:13:29 +09:00
committed by GitHub
parent dc175f08d3
commit 90dfa43ff1
8 changed files with 17 additions and 17 deletions

View File

@@ -223,7 +223,7 @@ Let's re-implement our operation now in terms of our :class:`Axpby` primitive.
/* const std::vector<int>& shape = */ out_shape,
/* Dtype dtype = */ out_dtype,
/* std::unique_ptr<Primitive> primitive = */
std::make_unique<Axpby>(to_stream(s), alpha, beta),
std::make_shared<Axpby>(to_stream(s), alpha, beta),
/* const std::vector<array>& inputs = */ broadcasted_inputs);
}