Skip to content
Snippets Groups Projects

Binary operators

Merged Houssem ROUIS requested to merge (removed):binary_operators into master
6 files
+ 100
7
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -39,6 +39,13 @@ void DivImpl_cpu_forward_kernel(std::size_t input1Length,
@@ -39,6 +39,13 @@ void DivImpl_cpu_forward_kernel(std::size_t input1Length,
output[i] = input_1[i] / input_2[0];
output[i] = input_1[i] / input_2[0];
}
}
}
}
 
else // input_2 is 1d and of size the number of channels of input_1
 
{
 
for (std::size_t i = 0; i < input1Length; ++i) {
 
std::size_t channelIdx = i % input2Length;
 
output[i] = input_1[i] / input_2[channelIdx];
 
}
 
}
}
}
namespace {
namespace {
Loading