Commit 972cfffe authored by Paul's avatar Paul
Browse files

Formatting

parent 1692db3c
...@@ -10,11 +10,11 @@ namespace migraph { ...@@ -10,11 +10,11 @@ namespace migraph {
namespace gpu { namespace gpu {
namespace device { namespace device {
template<class T> template <class T>
using vec4 = T __attribute__((ext_vector_type(4))); using vec4 = T __attribute__((ext_vector_type(4)));
template<class T> template <class T>
vec4<T>* as_vec4(T * x) vec4<T>* as_vec4(T* x)
{ {
return reinterpret_cast<vec4<T>*>(x); return reinterpret_cast<vec4<T>*>(x);
} }
...@@ -77,13 +77,13 @@ inline auto binary_broadcast(argument result, argument arg1, argument arg2) ...@@ -77,13 +77,13 @@ inline auto binary_broadcast(argument result, argument arg1, argument arg2)
{ {
vec4<type> x = xp[i]; vec4<type> x = xp[i];
vec4<type> out = outp[i]; vec4<type> out = outp[i];
for(std::size_t j = 0;j < 4;j++) { for(std::size_t j = 0; j < 4; j++)
{
auto gidx = i * 4 + j; auto gidx = i * 4 + j;
auto bidx = gidx % bdim_len; auto bidx = gidx % bdim_len;
auto b = buffer[bidx]; auto b = buffer[bidx];
out[j] = f(x[j], b); out[j] = f(x[j], b);
} }
} }
}); });
}); });
......
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