Tinkering with python wrapper

This commit is contained in:
Philippe Tillet
2015-08-03 11:13:31 -07:00
parent dd5f592fd8
commit a8b8c684e3
8 changed files with 71 additions and 61 deletions

View File

@@ -18,12 +18,12 @@ namespace isaac
namespace driver
{
CommandQueue::CommandQueue(cl_command_queue const & queue, bool take_ownership) : backend_(OPENCL), context_(backend::import(ocl::info<CL_QUEUE_CONTEXT>(queue))), device_(ocl::info<CL_QUEUE_DEVICE>(queue), false), h_(backend_, take_ownership)
CommandQueue::CommandQueue(cl_command_queue const & queue, bool take_ownership) : backend_(OPENCL), context_(&backend::import(ocl::info<CL_QUEUE_CONTEXT>(queue))), device_(ocl::info<CL_QUEUE_DEVICE>(queue), false), h_(backend_, take_ownership)
{
h_.cl() = queue;
}
CommandQueue::CommandQueue(Context const & context, Device const & device, cl_command_queue_properties properties): backend_(device.backend_), context_(context), device_(device), h_(backend_, true)
CommandQueue::CommandQueue(Context const & context, Device const & device, cl_command_queue_properties properties): backend_(device.backend_), context_(&context), device_(device), h_(backend_, true)
{
switch(backend_)
{
@@ -44,7 +44,7 @@ CommandQueue::CommandQueue(Context const & context, Device const & device, cl_co
}
Context const & CommandQueue::context() const
{ return context_; }
{ return *context_; }
Device const & CommandQueue::device() const
{ return device_; }