Commit b75abee1 authored by Paul's avatar Paul
Browse files

Formatting

parent 9167146e
...@@ -35,7 +35,7 @@ struct hip_device ...@@ -35,7 +35,7 @@ struct hip_device
{ {
hipStream_t result = nullptr; hipStream_t result = nullptr;
// auto status = hipStreamCreateWithFlags(&result, hipStreamNonBlocking); // auto status = hipStreamCreateWithFlags(&result, hipStreamNonBlocking);
auto status = hipStreamCreate(&result); auto status = hipStreamCreate(&result);
if(status != hipSuccess) if(status != hipSuccess)
MIGRAPHX_THROW("Failed to allocate stream"); MIGRAPHX_THROW("Failed to allocate stream");
...@@ -104,10 +104,7 @@ struct hip_device ...@@ -104,10 +104,7 @@ struct hip_device
streams.emplace_back(device_id); streams.emplace_back(device_id);
} }
std::size_t nstreams() const std::size_t nstreams() const { return streams.size(); }
{
return streams.size();
}
stream& get_stream() { return streams.at(current_stream); } stream& get_stream() { return streams.at(current_stream); }
...@@ -143,7 +140,10 @@ struct hip_device ...@@ -143,7 +140,10 @@ struct hip_device
struct context struct context
{ {
context(std::size_t device_id = 0, std::size_t n = 4) : current_device(std::make_shared<hip_device>(device_id, n)) {} context(std::size_t device_id = 0, std::size_t n = 4)
: current_device(std::make_shared<hip_device>(device_id, n))
{
}
hip_device& get_current_device() const hip_device& get_current_device() const
{ {
......
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