"docs/en_US/Tutorial/ExperimentConfig.md" did not exist on "d0b22fc7d755e0f53f4eee4137e3eefcf9c94ae8"
Commit c51bcdde authored by charlie's avatar charlie
Browse files

Use ternary operator

parent faefeef9
......@@ -419,32 +419,17 @@ const std::vector<shape::dynamic_dimension>& shape::dyn_dims() const { return im
std::vector<std::size_t> shape::min_lens() const
{
if(not this->dynamic())
{
return this->lens();
}
return impl->min_lens();
;
return this->dynamic() ? impl->min_lens() : this->lens();
}
std::vector<std::size_t> shape::max_lens() const
{
if(not this->dynamic())
{
return this->lens();
}
return impl->max_lens();
;
return this->dynamic() ? impl->max_lens() : this->lens();
}
std::vector<std::size_t> shape::opt_lens() const
{
if(not this->dynamic())
{
return this->lens();
}
return impl->opt_lens();
;
return this->dynamic() ? impl->opt_lens() : this->lens();
}
bool shape::dynamic_dimension::is_fixed() const { return this->min == this->max; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment