view TaskManager/Cell/CellTaskManagerImpl.h @ 1770:bb7f5ae152c7 draft

minor fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 23 Nov 2013 03:05:43 +0900
parents 71bf632092c8
children f73ca57cdc81
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; cpu_num = num-gpu; id_offset = gpu ;
    }
    ~CellTaskManagerImpl();

    /* variables */
    int cpu_num;
    int id_offset;

    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