ngraph Constant operator - add const for c-tor input parameters (#4091)

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
This commit is contained in:
Patryk Elszkowski
2021-02-03 05:50:50 +01:00
committed by GitHub
parent 359c2ca018
commit 461a71b641
2 changed files with 6 additions and 4 deletions

View File

@@ -54,7 +54,9 @@ namespace ngraph
/// \param values A vector of literals for initializing the tensor constant. The
/// size of values must match the size of the shape.
template <typename T>
Constant(const element::Type& type, Shape shape, const std::vector<T>& values)
Constant(const element::Type& type,
const Shape& shape,
const std::vector<T>& values)
: Constant(type, shape)
{
NODE_VALIDATION_CHECK(
@@ -91,7 +93,7 @@ namespace ngraph
/// value is broadcast to the specified shape.
template <class T,
class = typename std::enable_if<std::is_fundamental<T>::value>::type>
Constant(const element::Type& type, Shape shape, T value)
Constant(const element::Type& type, const Shape& shape, T value)
: Constant(type, shape)
{
auto size = shape_size(m_shape);
@@ -224,7 +226,7 @@ namespace ngraph
/// \param shape The shape of the tensor constant.
/// \param values A list of string values to use as the constant data.
Constant(const element::Type& type,
Shape shape,
const Shape& shape,
const std::vector<std::string>& values);
/// \brief Constructs a tensor constant with the supplied data

View File

@@ -59,7 +59,7 @@ op::Constant::Constant(const shared_ptr<runtime::Tensor>& tensor)
}
op::Constant::Constant(const element::Type& type,
Shape shape,
const Shape& shape,
const std::vector<std::string>& values)
: Constant(type, shape)
{