view include/TaskManager/TaskManager.h @ 134:92fcce4330f3

CreateSpan で、三角形を二つに割る時、 元々x軸に水平な辺を持っていると、辺に対して half_triangle をかけてしまい 暴走するので、その応急処置。詳しくは CreateSpan::half_triangle
author gongo@gendarme.cr.ie.u-ryukyu.ac.jp
date Thu, 27 Nov 2008 16:10:55 +0900
parents 5c194c71eca8
children 72dcf908ec52
line wrap: on
line source

#ifndef INCLUDED_TASK_MANAGER
#define INCLUDED_TASK_MANAGER

#ifndef INCLUDED_TASK_MANAGER_IMPL
#  include "TaskManagerImpl.h"
#endif

class TaskManager {
public:
    /* constructor */
    TaskManager(int num = 1); // The number of threads

    /* variables */
    TaskManagerImpl *m_impl;

    /* functions */
    void init(void);
    void finish(void);
    HTaskPtr create_task(int cmd);
    void run(void);

    void* malloc(int size) {
	return m_impl->allocate(size);
    }

private:
    int machineNum;
};

#endif

extern TaskManager *manager;