cuBLAS: fixed CUDA context import

This commit is contained in:
Philippe Tillet
2015-11-26 21:09:34 -05:00
parent 6fc94c0c0b
commit c0b9bbee43
5 changed files with 17 additions and 3 deletions

View File

@@ -34,7 +34,9 @@ std::string Context::cache_path()
return "";
}
Context::Context(CUcontext const & context, CUdevice const & device, bool take_ownership) : backend_(CUDA), device_(device, false), cache_path_(cache_path()), h_(backend_, take_ownership)
Context::Context(CUcontext const & context, bool take_ownership) : backend_(CUDA), device_(device(context), false), cache_path_(cache_path()), h_(backend_, take_ownership)
{
h_.cu() = context;
}
@@ -59,6 +61,7 @@ Context::Context(Device const & device) : backend_(device.backend_), device_(dev
default:
throw;
}
std::cout << "Shouldn't happen" << std::endl;
}
bool Context::operator==(Context const & other) const