view TaskManager/Gpu/GpuTaskManagerImpl.h @ 1435:9f6ba00ca15c draft

add gpu_sched_register
author Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
date Fri, 06 Apr 2012 07:57:27 +0900
parents 11dcd8165424
children 42057124fb44
line wrap: on
line source

#ifndef INCLUDED_GPU_TASK_MANAGER_IMPL
#define INCLUDED_GPU_TASK_MANAGER_IMPL

#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif


#include "TaskManagerImpl.h"
#include "FifoTaskManagerImpl.h"
#include "GpuThreads.h"
#include "QueueInfo.h"

class GpuTaskManagerImpl : public TaskManagerImpl {
public:
    GpuTaskManagerImpl(int num, Threads *gpus) : TaskManagerImpl(num) {gpuThreads = gpus;}
    ~GpuTaskManagerImpl();

    void init(int spuIdle,int useRefDma);
    void run();

public:
    QueueInfo<TaskList> *gpuTaskList;
    QueueInfo<TaskList> *taskListInfo;

    FifoTaskManagerImpl *ppeManager;

    Threads *gpuThreads;
    FifoTaskManagerImpl *ppeManager;

    cl_platform_id platform_id;
    cl_device_id device_id;
    cl_uint ret_num_platforms;
    cl_uint ret_num_devices;
    cl_context context;
    cl_command_queue command_queue;


};

#endif