Francisco Jerez | 1a8ad6c | 2013-04-06 14:35:00 +0200 | [diff] [blame] | 1 | // |
| 2 | // Copyright 2013 Francisco Jerez |
| 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | // copy of this software and associated documentation files (the "Software"), |
| 6 | // to deal in the Software without restriction, including without limitation |
| 7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | // and/or sell copies of the Software, and to permit persons to whom the |
| 9 | // Software is furnished to do so, subject to the following conditions: |
| 10 | // |
| 11 | // The above copyright notice and this permission notice shall be included in |
| 12 | // all copies or substantial portions of the Software. |
| 13 | // |
| 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
Kenneth Graunke | f0cb66b | 2013-04-21 13:52:08 -0700 | [diff] [blame] | 17 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 18 | // OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 | // OTHER DEALINGS IN THE SOFTWARE. |
Francisco Jerez | 1a8ad6c | 2013-04-06 14:35:00 +0200 | [diff] [blame] | 21 | // |
| 22 | |
Francisco Jerez | 099d281 | 2013-09-15 15:29:34 -0700 | [diff] [blame] | 23 | #ifndef CLOVER_CORE_PLATFORM_HPP |
| 24 | #define CLOVER_CORE_PLATFORM_HPP |
Francisco Jerez | 1a8ad6c | 2013-04-06 14:35:00 +0200 | [diff] [blame] | 25 | |
| 26 | #include <vector> |
| 27 | |
Francisco Jerez | bff60c8 | 2013-10-06 13:51:01 -0700 | [diff] [blame] | 28 | #include "core/object.hpp" |
Francisco Jerez | 1a8ad6c | 2013-04-06 14:35:00 +0200 | [diff] [blame] | 29 | #include "core/device.hpp" |
Francisco Jerez | c6e7a0d | 2013-09-16 21:44:19 -0700 | [diff] [blame] | 30 | #include "util/range.hpp" |
Francisco Jerez | 1a8ad6c | 2013-04-06 14:35:00 +0200 | [diff] [blame] | 31 | |
| 32 | namespace clover { |
Francisco Jerez | c6e7a0d | 2013-09-16 21:44:19 -0700 | [diff] [blame] | 33 | class platform : public _cl_platform_id, |
| 34 | public adaptor_range< |
Francisco Jerez | c4578d2 | 2014-02-18 15:07:11 +0100 | [diff] [blame] | 35 | evals, std::vector<intrusive_ref<device>> &> { |
Francisco Jerez | 49a49e0 | 2013-09-16 18:26:04 -0700 | [diff] [blame] | 36 | public: |
Francisco Jerez | 49a49e0 | 2013-09-16 18:26:04 -0700 | [diff] [blame] | 37 | platform(); |
| 38 | |
Francisco Jerez | 5226eac | 2013-09-16 21:44:36 -0700 | [diff] [blame] | 39 | platform(const platform &platform) = delete; |
| 40 | platform & |
| 41 | operator=(const platform &platform) = delete; |
| 42 | |
Pierre Moreau | 8f9b4a2 | 2018-01-18 23:42:51 +0100 | [diff] [blame] | 43 | std::string supported_extensions() const; |
| 44 | |
Francisco Jerez | 49a49e0 | 2013-09-16 18:26:04 -0700 | [diff] [blame] | 45 | protected: |
Francisco Jerez | c4578d2 | 2014-02-18 15:07:11 +0100 | [diff] [blame] | 46 | std::vector<intrusive_ref<device>> devs; |
Francisco Jerez | 49a49e0 | 2013-09-16 18:26:04 -0700 | [diff] [blame] | 47 | }; |
Francisco Jerez | 1a8ad6c | 2013-04-06 14:35:00 +0200 | [diff] [blame] | 48 | } |
| 49 | |
Francisco Jerez | 1a8ad6c | 2013-04-06 14:35:00 +0200 | [diff] [blame] | 50 | #endif |