Mercurial > hg > Game > Cerium
diff TaskManager/ManyCore/FileMapReduce.h @ 2050:26dd777ba95d draft
add User API
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 28 Jan 2016 15:43:36 +0900 |
parents | 6796d85f3d6b |
children | b79a250b4f99 |
line wrap: on
line diff
--- a/TaskManager/ManyCore/FileMapReduce.h Thu Jan 28 14:54:25 2016 +0900 +++ b/TaskManager/ManyCore/FileMapReduce.h Thu Jan 28 15:43:36 2016 +0900 @@ -1,6 +1,8 @@ #include <sys/types.h> #include "TaskManager.h" +#include "SchedTask.h" +#include "HTask.h" typedef struct wordCount { struct wordCount *self; @@ -55,6 +57,20 @@ } st_mmap_t; class FileMapReduce { +public: + /* constructor */ FileMapReduce(TaskManager *manager,const char* filename,int TASK_EXEC,int TASK_PRINT); + ~FileMapReduce(); + + /* User API */ + static void run_start(TaskManager *manager, const char *filename); void start(); + +private: + static void my_read(const char *filename, WordCount *w, TaskManager *manager); + static void my_mmap(const char *filename, WordCount *w); + + /* variable */ + HTaskPtr t_exec; + HTaskPtr t_print; };