| 23 | #include <vector> |
| 24 | |
| 25 | static bool findProperty(const std::vector<cl_properties>& props, |
| 26 | cl_properties prop, cl_properties& value) |
| 27 | { |
| 28 | // This function assumes properties are valid: |
| 29 | assert(props.size() == 0 || props.back() == 0); |
| 30 | assert(props.size() == 0 || props.size() % 2 == 1); |
| 31 | |
| 32 | for (cl_uint i = 0; i < props.size(); i = i + 2) |
| 33 | { |
| 34 | cl_properties check_prop = props[i]; |
| 35 | |
| 36 | if (check_prop == 0) |
| 37 | { |
| 38 | break; |
| 39 | } |
| 40 | |
| 41 | if (check_prop == prop) |
| 42 | { |
| 43 | value = props[i + 1]; |
| 44 | return true; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | return false; |
| 49 | } |
| 50 | |
| 51 | int compareProperties(const std::vector<cl_properties>& queried, |
| 52 | const std::vector<cl_properties>& check) |
no test coverage detected