view TaskManager/Cell/CellTaskManagerImpl.h @ 1561:e8c9a7099bcc draft

add set NDRange param
author Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
date Tue, 12 Mar 2013 16:52:49 +0900
parents 163220e54cc0
children 90c0ad32655f
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, Threads *cpus) : TaskManagerImpl(num) {speThreads = cpus;}
    ~CellTaskManagerImpl();

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

    Threads *speThreads;
    FifoTaskManagerImpl *ppeManager;
    int spe_running;
    int spuIdle;
    /* 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 set_NDRange(void* ndr);
    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