Commit 5883ffad authored by Paul's avatar Paul
Browse files

Formatting

parent 8bbdc2db
...@@ -29,8 +29,8 @@ inline hip_ptr write_to_gpu(const void* x, std::size_t sz) ...@@ -29,8 +29,8 @@ inline hip_ptr write_to_gpu(const void* x, std::size_t sz)
template <class T> template <class T>
hip_ptr write_to_gpu(const T& x) hip_ptr write_to_gpu(const T& x)
{ {
using type = typename T::value_type; using type = typename T::value_type;
auto size = x.size() * sizeof(type); auto size = x.size() * sizeof(type);
return write_to_gpu(x.data(), size); return write_to_gpu(x.data(), size);
} }
...@@ -54,7 +54,7 @@ inline rtg::argument from_gpu(rtg::argument arg) ...@@ -54,7 +54,7 @@ inline rtg::argument from_gpu(rtg::argument arg)
rtg::argument result; rtg::argument result;
arg.visit([&](auto x) { arg.visit([&](auto x) {
using type = typename decltype(x)::value_type; using type = typename decltype(x)::value_type;
auto v = read_from_gpu<type>(arg.data(), x.get_shape().bytes() / sizeof(type)); auto v = read_from_gpu<type>(arg.data(), x.get_shape().bytes() / sizeof(type));
result = {x.get_shape(), [v]() mutable { return reinterpret_cast<char*>(v.data()); }}; result = {x.get_shape(), [v]() mutable { return reinterpret_cast<char*>(v.data()); }};
}); });
return result; return result;
......
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