26 bool HasBackend =
false;
27 bool HasDeviceType =
false;
28 bool HasDeviceNum =
false;
33 friend std::ostream &
operator<<(std::ostream &Out,
38 std::vector<device_filter> FilterList;
45 std::vector<device_filter> &
get() {
return FilterList; }
46 bool backendCompatible(
backend Backend);
48 bool deviceNumberCompatible(
int DeviceNum);
50 friend std::ostream &
operator<<(std::ostream &Out,
57 if (Filter.
DeviceType == info::device_type::host) {
59 }
else if (Filter.
DeviceType == info::device_type::cpu) {
61 }
else if (Filter.
DeviceType == info::device_type::gpu) {
63 }
else if (Filter.
DeviceType == info::device_type::accelerator) {