File indexing completed on 2024-11-15 09:04:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_COMPUTE_DETAIL_VENDOR_HPP
0012 #define BOOST_COMPUTE_DETAIL_VENDOR_HPP
0013
0014 #include <boost/compute/device.hpp>
0015 #include <boost/compute/platform.hpp>
0016
0017 namespace boost {
0018 namespace compute {
0019 namespace detail {
0020
0021
0022 inline bool is_nvidia_device(const device &device)
0023 {
0024 std::string nvidia("NVIDIA");
0025 return device.vendor().compare(0, nvidia.size(), nvidia) == 0;
0026 }
0027
0028
0029 inline bool is_amd_device(const device &device)
0030 {
0031 return device.platform().vendor() == "Advanced Micro Devices, Inc.";
0032 }
0033
0034
0035 inline bool is_apple_platform(const platform &platform)
0036 {
0037 return platform.name() == "Apple";
0038 }
0039
0040
0041 inline bool is_apple_platform_device(const device &device)
0042 {
0043 return is_apple_platform(device.platform());
0044 }
0045
0046 }
0047 }
0048 }
0049
0050 #endif