MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / platform

Class platform

compute/include/boost/compute/platform.hpp:37–233  ·  view source on GitHub ↗

\class platform \brief A compute platform. The platform class provides an interface to an OpenCL platform. To obtain a list of all platforms on the system use the system::platforms() method. \see device, context

Source from the content-addressed store, hash-verified

35///
36/// \see device, context
37class platform
38{
39public:
40 /// Creates a new platform object for \p id.
41 explicit platform(cl_platform_id id)
42 : m_platform(id)
43 {
44 }
45
46 /// Creates a new platform as a copy of \p other.
47 platform(const platform &other)
48 : m_platform(other.m_platform)
49 {
50 }
51
52 /// Copies the platform id from \p other.
53 platform& operator=(const platform &other)
54 {
55 if(this != &other){
56 m_platform = other.m_platform;
57 }
58
59 return *this;
60 }
61
62 /// Destroys the platform object.
63 ~platform()
64 {
65 }
66
67 /// Returns the ID of the platform.
68 cl_platform_id id() const
69 {
70 return m_platform;
71 }
72
73 /// Returns the name of the platform.
74 std::string name() const
75 {
76 return get_info<std::string>(CL_PLATFORM_NAME);
77 }
78
79 /// Returns the name of the vendor for the platform.
80 std::string vendor() const
81 {
82 return get_info<std::string>(CL_PLATFORM_VENDOR);
83 }
84
85 /// Returns the profile string for the platform.
86 std::string profile() const
87 {
88 return get_info<std::string>(CL_PLATFORM_PROFILE);
89 }
90
91 /// Returns the version string for the platform.
92 std::string version() const
93 {
94 return get_info<std::string>(CL_PLATFORM_VERSION);

Callers 1

platformMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected