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

Method devices

compute/include/boost/compute/system.hpp:113–127  ·  view source on GitHub ↗

Returns a vector containing all of the compute devices on the system. For example, to print out the name of each OpenCL-capable device available on the system: \code for(const auto &device : boost::compute::system::devices()){ std::cout << device.name() << std::endl; } \endcode

Source from the content-addressed store, hash-verified

111 /// }
112 /// \endcode
113 static std::vector<device> devices()
114 {
115 std::vector<device> devices;
116
117 const std::vector<platform> platforms = system::platforms();
118 for(size_t i = 0; i < platforms.size(); i++){
119 const std::vector<device> platform_devices = platforms[i].devices();
120
121 devices.insert(
122 devices.end(), platform_devices.begin(), platform_devices.end()
123 );
124 }
125
126 return devices;
127 }
128
129 /// Returns the number of compute devices on the system.
130 static size_t device_count()

Callers 5

InitGPUMethod · 0.45
InitGPUMethod · 0.45
mainFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 4

sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36