Commit f4178abd authored by Khalique's avatar Khalique
Browse files

formatting

parent 9a2c7339
......@@ -226,7 +226,9 @@ struct onnx_parser
});
}
instruction_ref parse_clip(const std::string&, const attribute_map& attributes, std::vector<instruction_ref> args)
instruction_ref parse_clip(const std::string&,
const attribute_map& attributes,
std::vector<instruction_ref> args)
{
op::clip op;
if(contains(attributes, "max"))
......
......@@ -148,7 +148,7 @@ struct clip_op
{
auto& max = op.max_val;
auto& min = op.min_val;
return [max, min](auto x) { return x > min ? (x < max ? x : max) : min ; };
return [max, min](auto x) { return x > min ? (x < max ? x : max) : min; };
}
};
......
......@@ -12,9 +12,8 @@ shape hip_clip::compute_shape(std::vector<shape> inputs) const
return op.compute_shape(inputs);
}
argument hip_clip::compute(context& ctx,
const shape& output_shape,
const std::vector<argument>& args) const
argument
hip_clip::compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const
{
assert(output_shape == args.back().get_shape());
(void)output_shape;
......
......@@ -7,10 +7,10 @@ namespace gpu {
namespace device {
void clip(hipStream_t stream,
const argument& result,
const argument& arg1,
const float& max,
const float& min)
const argument& result,
const argument& arg1,
const float& max,
const float& min)
{
nary(stream, result, arg1)(
[max, min](auto x) { return std::min<decltype(x)>(std::max<decltype(x)>(min, x), max); });
......
......@@ -11,10 +11,10 @@ namespace gpu {
namespace device {
void clip(hipStream_t stream,
const argument& result,
const argument& arg1,
const float& max,
const float& min);
const argument& result,
const argument& arg1,
const float& max,
const float& min);
} // namespace device
} // namespace gpu
......
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