annotate TaskManager/Gpu/GpuScheduler.h @ 1434:05d480ab70ba draft

add GpuScheduler
author Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
date Thu, 05 Apr 2012 19:05:35 +0900
parents
children 9f6ba00ca15c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1434
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #ifndef INCLUDED_GPU_SCHEDULER
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #define INCLUDED_GPU_SCHEDULER
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include "Scheduler.h"
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 #ifdef __APPLE__
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 #include <OpenCL/opencl.h>
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 #else
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 #include <CL/cl.h>
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 #endif
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 class GpuScheduler : public Scheduler {
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 public:
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 void init_impl(int useRefDma);
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 void set_command_queue(cl_command_queue* _command_queue) {
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 command_queue = _command_queue;
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 }
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 private:
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 cl_command_queue *command_queue;
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 };
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
05d480ab70ba add GpuScheduler
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 #endif