Files
triton/include/isaac/driver/backend.h

45 lines
963 B
C
Raw Normal View History

#ifndef ISAAC_CL_QUEUES_H
#define ISAAC_CL_QUEUES_H
#include <map>
#include <list>
2015-07-21 22:02:36 -07:00
#include "isaac/defines.h"
#include "isaac/driver/command_queue.h"
#include "isaac/driver/context.h"
namespace isaac
{
namespace driver
{
2015-07-30 21:02:30 -07:00
class ISAACAPI backend
{
public:
typedef std::list<std::pair<Context, std::vector<CommandQueue> > > container_type;
private:
2015-07-30 21:02:30 -07:00
static std::vector<CommandQueue> & append( Context const & context);
static void cuinit();
static void clinit();
static void init();
public:
2015-07-30 21:02:30 -07:00
static container_type const & contexts();
static Context default_context();
static std::vector<CommandQueue> & default_queues();
static std::vector<CommandQueue> & queues(Context const &);
private:
2015-07-30 21:02:30 -07:00
static container_type data_;
public:
2015-07-30 21:02:30 -07:00
static unsigned int default_device;
static cl_command_queue_properties queue_properties;
};
ISAACAPI void synchronize(std::vector<CommandQueue> const &);
ISAACAPI void synchronize(Context const &);
}
}
#endif