view TaskManager/Cell/CellTaskManagerImpl.h @ 1627:8b2d3ac19991 draft

fix
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Mon, 03 Jun 2013 17:02:51 +0900
parents 4fed76f4d101
children b53d197ec03d
line wrap: on
line source

#ifndef INCLUDED_CELL_TASK_MANAGER_IMPL
#define INCLUDED_CELL_TASK_MANAGER_IMPL

#include "TaskManagerImpl.h"
#include "FifoTaskManagerImpl.h"
#ifdef __CERIUM_CELL__
#include "SpeThreads.h"
#else
#include "CpuThreads.h"
#endif

class CellTaskManagerImpl : public TaskManagerImpl {
public:
    /* constructor */
 CellTaskManagerImpl(int num, int gpu, Threads *cpus) : TaskManagerImpl(num) {gpuNum = gpu; speThreads = cpus;}
    ~CellTaskManagerImpl();

    /* variables */
    QueueInfo<TaskList> **taskListInfo;
    QueueInfo<TaskList> **speTaskList;  // running task

    Threads *speThreads;
    FifoTaskManagerImpl *ppeManager;
    int spe_running;
    int spuIdle;
    int gpuNum;
    /* functions */
    // system
    void init(int spuIdle,int useRefDma, int export_task_log);
    void run();
    void poll();
    void poll1(int spu_limit);
    void poll2(int spu_limit);
    void mail_check(int id);
    TaskListPtr createTaskList();
    //void set_runTaskList(*QueueInfo<HTask>);
    void set_runTaskList(QueueInfo<HTask>* activeTaskQueue);
    void sendTaskList();
    void append_activeTask(HTaskPtr);
    void show_profile() ;
    void start_profile() ;
    void export_task_log() ;
    void polling();
    void debug_check_spe_idle(QueueInfo<HTask> * activeTaskQueue, int spe_running_);
    void print_arch();
private:
    void send_taskList(int id);
    void show_dead_lock_info();

};

#endif