blob: b94434c983cfbdaf4db93bb7b4f9d3f6bcae9cc5 [file] [log] [blame]
Francisco Jerez1a8ad6c2013-04-06 14:35:00 +02001//
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 Graunkef0cb66b2013-04-21 13:52:08 -070017// 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 Jerez1a8ad6c2013-04-06 14:35:00 +020021//
22
Francisco Jerez099d2812013-09-15 15:29:34 -070023#ifndef CLOVER_CORE_PLATFORM_HPP
24#define CLOVER_CORE_PLATFORM_HPP
Francisco Jerez1a8ad6c2013-04-06 14:35:00 +020025
26#include <vector>
27
Francisco Jerezbff60c82013-10-06 13:51:01 -070028#include "core/object.hpp"
Francisco Jerez1a8ad6c2013-04-06 14:35:00 +020029#include "core/device.hpp"
Francisco Jerezc6e7a0d2013-09-16 21:44:19 -070030#include "util/range.hpp"
Francisco Jerez1a8ad6c2013-04-06 14:35:00 +020031
32namespace clover {
Francisco Jerezc6e7a0d2013-09-16 21:44:19 -070033 class platform : public _cl_platform_id,
34 public adaptor_range<
Francisco Jerezc4578d22014-02-18 15:07:11 +010035 evals, std::vector<intrusive_ref<device>> &> {
Francisco Jerez49a49e02013-09-16 18:26:04 -070036 public:
Francisco Jerez49a49e02013-09-16 18:26:04 -070037 platform();
38
Francisco Jerez5226eac2013-09-16 21:44:36 -070039 platform(const platform &platform) = delete;
40 platform &
41 operator=(const platform &platform) = delete;
42
Pierre Moreau8f9b4a22018-01-18 23:42:51 +010043 std::string supported_extensions() const;
44
Francisco Jerez49a49e02013-09-16 18:26:04 -070045 protected:
Francisco Jerezc4578d22014-02-18 15:07:11 +010046 std::vector<intrusive_ref<device>> devs;
Francisco Jerez49a49e02013-09-16 18:26:04 -070047 };
Francisco Jerez1a8ad6c2013-04-06 14:35:00 +020048}
49
Francisco Jerez1a8ad6c2013-04-06 14:35:00 +020050#endif