Commit d992494e authored by Paul's avatar Paul
Browse files

Formatting

parent 6459204c
...@@ -90,7 +90,7 @@ inline auto binary_broadcast_vec(argument result, argument arg1, argument arg2) ...@@ -90,7 +90,7 @@ inline auto binary_broadcast_vec(argument result, argument arg1, argument arg2)
buffer[i] = yp[i]; buffer[i] = yp[i];
} }
__syncthreads(); __syncthreads();
auto * bp = as_pointer(buffer); auto* bp = as_pointer(buffer);
// Process the data // Process the data
for(size_t i = idx.global; i < n; i += nglobal) for(size_t i = idx.global; i < n; i += nglobal)
{ {
...@@ -230,10 +230,10 @@ inline auto nary(argument result, argument arg1, argument arg2) ...@@ -230,10 +230,10 @@ inline auto nary(argument result, argument arg1, argument arg2)
auto b_len = result.get_shape().lens()[b_idx]; auto b_len = result.get_shape().lens()[b_idx];
auto b_stride = result.get_shape().strides()[b_idx]; auto b_stride = result.get_shape().strides()[b_idx];
assert(arg2.get_shape().lens()[b_idx] == b_len); assert(arg2.get_shape().lens()[b_idx] == b_len);
if(b_len <= 2048 and if(b_len <= 2048 and std::none_of(std::next(b_it), strides.end(), not_zero))
std::none_of(std::next(b_it), strides.end(), not_zero))
{ {
const bool divisible_by_4 = (b_len % 4 == 0) and (b_stride % 4 == 0) and (arg1.get_shape().elements() % 4 == 0); const bool divisible_by_4 = (b_len % 4 == 0) and (b_stride % 4 == 0) and
(arg1.get_shape().elements() % 4 == 0);
if(divisible_by_4) if(divisible_by_4)
binary_broadcast_vec(result, arg1, arg2)(f); binary_broadcast_vec(result, arg1, arg2)(f);
else else
......
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