Commit 981bd143 authored by Paul's avatar Paul
Browse files

Formatting

parent 3362f2fa
......@@ -426,13 +426,13 @@ struct broadcast
std::string name() const { return "broadcast"; }
shape compute_shape(std::vector<shape> inputs) const
{
auto t = inputs.at(0).type();
auto shape0 = inputs.at(0);
auto shape1 = inputs.at(1);
auto shape0_lens = shape0.lens();
auto shape1_lens = shape1.lens();
auto t = inputs.at(0).type();
auto shape0 = inputs.at(0);
auto shape1 = inputs.at(1);
auto shape0_lens = shape0.lens();
auto shape1_lens = shape1.lens();
const auto& shape0_strides = shape0.lens();
auto shape1_strides = shape1.lens();
auto shape1_strides = shape1.lens();
if(std::all_of(shape0_lens.cbegin(), shape1_lens.cend(), [&](auto x) { return x == 1; }))
{
if(axis != 0)
......
......@@ -11,10 +11,10 @@ void fred()
size_t axis = 1;
rtg::shape shape0{rtg::shape::float_type, {2, 4, 3, 4}};
rtg::shape shape1{rtg::shape::float_type, {4, 3}};
std::vector<size_t> shape0_lens = shape0.lens();
std::vector<size_t> shape1_lens = shape1.lens();
std::vector<size_t> shape0_lens = shape0.lens();
std::vector<size_t> shape1_lens = shape1.lens();
const std::vector<size_t>& shape0_strides = shape0.strides();
std::vector<size_t> shape1_strides = shape1.strides();
std::vector<size_t> shape1_strides = shape1.strides();
for(size_t i = 0; i < shape1.lens().size(); i++)
{
assert(shape0_lens[i + axis] == shape1_lens[i]);
......
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