Mercurial > projects > cl4d
comparison opencl/device.d @ 3:c78ffc9a7434 default tip
* corrected import declarations
* fixed bug in Program
author | Trass3r |
---|---|
date | Thu, 15 Apr 2010 03:20:03 +0200 |
parents | 3cea44337083 |
children |
comparison
equal
deleted
inserted
replaced
2:01d502efe0c4 | 3:c78ffc9a7434 |
---|---|
1 /** | 1 /** |
2 * | 2 * |
3 */ | 3 */ |
4 module opencl.device; | 4 module opencl.device; |
5 | 5 |
6 import opencl.c.opencl; | 6 import opencl.c.cl; |
7 import opencl.platform; | 7 import opencl.platform; |
8 import opencl.wrapper; | 8 import opencl.wrapper; |
9 | 9 |
10 /// device class | 10 /// device class |
11 class CLDevice : CLWrapper!(cl_device_id, clGetDeviceInfo) | 11 class CLDevice : CLWrapper!(cl_device_id, clGetDeviceInfo) |
12 { | 12 { |
13 private: | 13 private: |
14 CLPlatform _platform; | 14 CLPlatform _platform; |
15 | 15 |
16 public: | 16 public: |
17 /// need a constructor without platform, if we need to wrap a retrieved cl_device_id | |
18 this(cl_device_id device) | |
19 { | |
20 super(device); | |
21 // TODO: retrieve platform ID via CL call and set _platform | |
22 } | |
23 | |
17 /// | 24 /// |
18 this(CLPlatform platform, cl_device_id device) | 25 this(CLPlatform platform, cl_device_id device) |
19 { | 26 { |
20 super(device); | 27 super(device); |
21 _platform = platform; | 28 _platform = platform; |